-
Notifications
You must be signed in to change notification settings - Fork 667
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
fix(occupancy_grid_map_outlier_filter): add intensity field #6797
fix(occupancy_grid_map_outlier_filter): add intensity field #6797
Conversation
eeab1b2
to
6eea3e7
Compare
Signed-off-by: badai-nguyen <[email protected]>
Signed-off-by: badai-nguyen <[email protected]>
Signed-off-by: badai-nguyen <[email protected]>
Signed-off-by: badai-nguyen <[email protected]>
This reverts commit d16b3e0.
Signed-off-by: badai-nguyen <[email protected]>
Signed-off-by: badai-nguyen <[email protected]>
7a4ac14
to
fa0543c
Compare
@@ -46,18 +46,17 @@ using geometry_msgs::msg::Pose; | |||
using nav_msgs::msg::OccupancyGrid; | |||
using sensor_msgs::msg::PointCloud2; | |||
using std_msgs::msg::Header; | |||
using PclPointCloud = pcl::PointCloud<pcl::PointXYZ>; | |||
using PclPointCloud = pcl::PointCloud<pcl::PointXYZI>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to support XYZ so that it works with XYZ and XYZI?
If it doesn't work without XYZI, it will be difficult to use it with other sensors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yukkysaito Sorry that line is just typo. I fixed here 0aed0ad
In summary, this PR will avoid fixed pointcloud type like pcl::PointXYZ or pcl::PointXYZI.
Almost of all calculations are replaced and done directly in Pointcloud2 except kd_tree_->radiusSearch. So that the pointcloud type will be coppied through the node by reference point_step
of input topic. Then the pointcloud type which is processed and output depends and is the same as input pointcloud type.
Here is testing result of output when I input pcl::PointXYZ type into the node.
Left: input topic
Right output topic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yukkysaito do you have other concerns related with this?
Signed-off-by: badai-nguyen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late review, I wrote 1 major comment and 1 minor comment.
perception/occupancy_grid_map_outlier_filter/src/occupancy_grid_map_outlier_filter_nodelet.cpp
Outdated
Show resolved
Hide resolved
output.height = input.height; | ||
output.is_bigendian = input.is_bigendian; | ||
output.is_dense = input.is_dense; | ||
output.width = output.data.size() / output.point_step / output.height; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though I know that normally height and point_step would not become 0, I prefer adding some error handling here.
// you can write it with rclcpp error handling
if (output.height == 0 || output.point_step == 0) {
std::cerr << "Error: output.height or output.point_step cannot be zero." << std::endl;
return;
}
Signed-off-by: badai-nguyen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I aslo confirmed that the output of |
…foundation#6797) * fix(occupancy_grid_map_outlier_filter): add intensity field Signed-off-by: badai-nguyen <[email protected]> * fix: add intensity Signed-off-by: badai-nguyen <[email protected]> * fix: using empty padding field Signed-off-by: badai-nguyen <[email protected]> * refactor Signed-off-by: badai-nguyen <[email protected]> * Revert "refactor" This reverts commit d16b3e0. * refactor Signed-off-by: badai-nguyen <[email protected]> * fix: radius filter Signed-off-by: badai-nguyen <[email protected]> * chore: typo Signed-off-by: badai-nguyen <[email protected]> * fix: typo Signed-off-by: badai-nguyen <[email protected]> --------- Signed-off-by: badai-nguyen <[email protected]>
…foundation#6797) * fix(occupancy_grid_map_outlier_filter): add intensity field Signed-off-by: badai-nguyen <[email protected]> * fix: add intensity Signed-off-by: badai-nguyen <[email protected]> * fix: using empty padding field Signed-off-by: badai-nguyen <[email protected]> * refactor Signed-off-by: badai-nguyen <[email protected]> * Revert "refactor" This reverts commit d16b3e0. * refactor Signed-off-by: badai-nguyen <[email protected]> * fix: radius filter Signed-off-by: badai-nguyen <[email protected]> * chore: typo Signed-off-by: badai-nguyen <[email protected]> * fix: typo Signed-off-by: badai-nguyen <[email protected]> --------- Signed-off-by: badai-nguyen <[email protected]> Signed-off-by: vividf <[email protected]>
…foundation#6797) * fix(occupancy_grid_map_outlier_filter): add intensity field Signed-off-by: badai-nguyen <[email protected]> * fix: add intensity Signed-off-by: badai-nguyen <[email protected]> * fix: using empty padding field Signed-off-by: badai-nguyen <[email protected]> * refactor Signed-off-by: badai-nguyen <[email protected]> * Revert "refactor" This reverts commit d16b3e0. * refactor Signed-off-by: badai-nguyen <[email protected]> * fix: radius filter Signed-off-by: badai-nguyen <[email protected]> * chore: typo Signed-off-by: badai-nguyen <[email protected]> * fix: typo Signed-off-by: badai-nguyen <[email protected]> --------- Signed-off-by: badai-nguyen <[email protected]>
…foundation#6797) * fix(occupancy_grid_map_outlier_filter): add intensity field Signed-off-by: badai-nguyen <[email protected]> * fix: add intensity Signed-off-by: badai-nguyen <[email protected]> * fix: using empty padding field Signed-off-by: badai-nguyen <[email protected]> * refactor Signed-off-by: badai-nguyen <[email protected]> * Revert "refactor" This reverts commit d16b3e0. * refactor Signed-off-by: badai-nguyen <[email protected]> * fix: radius filter Signed-off-by: badai-nguyen <[email protected]> * chore: typo Signed-off-by: badai-nguyen <[email protected]> * fix: typo Signed-off-by: badai-nguyen <[email protected]> --------- Signed-off-by: badai-nguyen <[email protected]>
Description
occupancy_grid_map_outlier_filter
to solve the issue Add intensity for poincloud processing in perception and an intensity_based_unknown_validator #6785point_step
of input topic so that the pointcloud type which is processed and output depends and is the same as input pointcloud type.Related links
Tests performed
Confirmed by logging_simulator that the intensity is added into the current empty padding fiedl (offset 12)
Notes for reviewers
Interface changes
Effects on system behavior
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.