Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(centerpoint): cherrypicked upstream changes for x2_gen2/v0.29.0 #1700

Merged
merged 15 commits into from
Dec 16, 2024
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: fixed cherrycommit induced errors
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
knzo25 committed Dec 16, 2024

Verified

This commit was signed with the committer’s verified signature.
knzo25 Kenzo Lobos Tsunekawa
commit 0b6ea664659e787db0999b9642b1ad3f7f5945bc
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ void PostprocessKernelTest::SetUp()

constexpr std::size_t class_size{5};
constexpr std::size_t point_feature_size{4};
const std::size_t cloud_capacity{2000000};
constexpr std::size_t max_voxel_size{100000000};
const std::vector<double> point_cloud_range{-76.8, -76.8, -4.0, 76.8, 76.8, 6.0};
const std::vector<double> voxel_size{0.32, 0.32, 10.0};
@@ -40,7 +41,7 @@ void PostprocessKernelTest::SetUp()
constexpr bool has_variance{false};

config_ptr_ = std::make_unique<centerpoint::CenterPointConfig>(
class_size, point_feature_size, max_voxel_size, point_cloud_range, voxel_size,
class_size, point_feature_size, cloud_capacity, max_voxel_size, point_cloud_range, voxel_size,
downsample_factor, encoder_in_feature_size, score_threshold, circle_nms_dist_threshold,
yaw_norm_thresholds, has_variance);

19 changes: 10 additions & 9 deletions perception/lidar_centerpoint/test/test_voxel_generator.cpp
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@ void VoxelGeneratorTest::SetUp()

class_size_ = 5;
point_feature_size_ = 4;
cloud_capacity_ = 2000000;
max_voxel_size_ = 100000000;
point_cloud_range_ = std::vector<double>{-76.8, -76.8, -4.0, 76.8, 76.8, 6.0};
voxel_size_ = std::vector<double>{0.32, 0.32, 10.0};
@@ -110,9 +111,9 @@ TEST_F(VoxelGeneratorTest, SingleFrame)
centerpoint::DensificationParam param(world_frame_, num_past_frames);

centerpoint::CenterPointConfig config(
class_size_, point_feature_size_, max_voxel_size_, point_cloud_range_, voxel_size_,
downsample_factor_, encoder_in_feature_size_, score_threshold_, circle_nms_dist_threshold_,
yaw_norm_thresholds_, has_variance_);
class_size_, point_feature_size_, cloud_capacity_, max_voxel_size_, point_cloud_range_,
voxel_size_, downsample_factor_, encoder_in_feature_size_, score_threshold_,
circle_nms_dist_threshold_, yaw_norm_thresholds_, has_variance_);

centerpoint::VoxelGenerator voxel_generator(param, config);
std::vector<float> points;
@@ -157,9 +158,9 @@ TEST_F(VoxelGeneratorTest, TwoFramesNoTf)
centerpoint::DensificationParam param(world_frame_, num_past_frames);

centerpoint::CenterPointConfig config(
class_size_, point_feature_size_, max_voxel_size_, point_cloud_range_, voxel_size_,
downsample_factor_, encoder_in_feature_size_, score_threshold_, circle_nms_dist_threshold_,
yaw_norm_thresholds_, has_variance_);
class_size_, point_feature_size_, cloud_capacity_, max_voxel_size_, point_cloud_range_,
voxel_size_, downsample_factor_, encoder_in_feature_size_, score_threshold_,
circle_nms_dist_threshold_, yaw_norm_thresholds_, has_variance_);

centerpoint::VoxelGenerator voxel_generator(param, config);
std::vector<float> points;
@@ -191,9 +192,9 @@ TEST_F(VoxelGeneratorTest, TwoFrames)
centerpoint::DensificationParam param(world_frame_, num_past_frames);

centerpoint::CenterPointConfig config(
class_size_, point_feature_size_, max_voxel_size_, point_cloud_range_, voxel_size_,
downsample_factor_, encoder_in_feature_size_, score_threshold_, circle_nms_dist_threshold_,
yaw_norm_thresholds_, has_variance_);
class_size_, point_feature_size_, cloud_capacity_, max_voxel_size_, point_cloud_range_,
voxel_size_, downsample_factor_, encoder_in_feature_size_, score_threshold_,
circle_nms_dist_threshold_, yaw_norm_thresholds_, has_variance_);

centerpoint::VoxelGenerator voxel_generator(param, config);
std::vector<float> points;
1 change: 1 addition & 0 deletions perception/lidar_centerpoint/test/test_voxel_generator.hpp
Original file line number Diff line number Diff line change
@@ -51,6 +51,7 @@ class VoxelGeneratorTest : public testing::Test

std::size_t class_size_{};
float point_feature_size_{};
std::size_t cloud_capacity_{};
std::size_t max_voxel_size_{};

std::vector<double> point_cloud_range_{};
Original file line number Diff line number Diff line change
@@ -64,6 +64,9 @@ class TransfusionConfig
voxel_y_size_ = static_cast<float>(voxel_size[1]);
voxel_z_size_ = static_cast<float>(voxel_size[2]);
}
if (num_proposals > 0) {
num_proposals_ = num_proposals;
}
if (score_threshold > 0.0) {
score_threshold_ = score_threshold;
}
@@ -110,7 +113,7 @@ class TransfusionConfig
const std::size_t out_size_factor_{4};
const std::size_t max_num_points_per_pillar_{points_per_voxel_};
const std::size_t num_point_values_{4};
const std::size_t num_proposals_{200};
std::size_t num_proposals_{200};
// the number of feature maps for pillar scatter
const std::size_t num_feature_scatter_{pillar_feature_size_};
// the score threshold for classification
4 changes: 2 additions & 2 deletions perception/lidar_transfusion/src/lidar_transfusion_node.cpp
Original file line number Diff line number Diff line change
@@ -77,8 +77,8 @@ LidarTransfusionNode::LidarTransfusionNode(const rclcpp::NodeOptions & options)
DensificationParam densification_param(
densification_world_frame_id, densification_num_past_frames);
TransfusionConfig config(
voxels_num, point_cloud_range, voxel_size, num_proposals, circle_nms_dist_threshold,
yaw_norm_thresholds, score_threshold);
cloud_capacity, voxels_num, point_cloud_range, voxel_size, num_proposals,
circle_nms_dist_threshold, yaw_norm_thresholds, score_threshold);

const auto allow_remapping_by_area_matrix =
this->declare_parameter<std::vector<int64_t>>("allow_remapping_by_area_matrix", descriptor);