Added pointcloud_to_pcd and combined_pointcloud_to_pcd#527
Added pointcloud_to_pcd and combined_pointcloud_to_pcd#527kubojion wants to merge 1 commit intoros-perception:humblefrom
Conversation
|
The port of pointcloud_to_pcd was already done in #486 which was merged in jazzy. So please update to jazzy if you need this feature. If you want to backport this issue, please rebase the existing commit, but I tried locally and there are a lot of merge conflicts. |
…ntcloud_to_pcd from ros2 branch - pointcloud_to_pcd was never ported from ROS 1; its CMakeLists entry was also commented out. Port replaces ros/ros.h, ros::NodeHandle, boost::shared_ptr with rclcpp equivalents, uses pcl/common/io.h for PCL >= 1.12 compatibility, and registers as an rclcpp component. - combined_pointcloud_to_pcd backported from ros2 branch with two Humble-compatible adaptations: pcl_ros::transformPointCloud replaces the unavailable pcl::transformPointCloud(PCLPointCloud2) overload; direct buffer append replaces the conflicting pcl::concatenatePointCloud overload. Accumulates as pcl::PCLPointCloud2 to preserve all fields. - CMakeLists.txt: add both tools as shared libs via rclcpp_components. - package.xml: add tf2_eigen dependency.
|
@Rayman Thanks for the review. I'm on Ubuntu 22 which is tied to Humble, so upgrading to Jazzy isn't an option. For pointcloud_to_pcd.cpp I replaced with the ros2 branch HEAD verbatim, including QoS overrides, pcl::PCLPointCloud2, timestamp formatting, and .hpp tf2 headers. Compiles cleanly on Humble. For combined_pointcloud_to_pcd, I kept the pcl::PCLPointCloud2 accumulator rather than the pcl::PointCloudpcl::PointXYZ / pcl::PointCloudpcl::PointXYZRGB approach in the ros2 branch, since the typed approach silently drops all fields except X/Y/Z (or RGB) - intensity, ring, timestamp, etc. are lost. Happy to do a proper git cherry pick of the original commits if you'd prefer the history to reflect that. |
|
I'd prefer cherry picking of the original commits. Then I know patches can be packported easily. Btw, you mentioned combined_pointcloud_to_pcd is missing some fields. Is that something you would like to propose to add to the ros2 branch? (and then backport) |
pointcloud_to_pcdwas broken on thehumblebranch as the source file was still ROS 1 code and the CMakeLists.txt entry was commented out.combined_pointcloud_to_pcd(available in theros2branch) was also missing fromhumble.CHANGES
pointcloud_to_pcd.cpp- ported from ROS 1 to ROS 2:combined_pointcloud_to_pcd.cpp- backported fromros2branch with two adaptations for Humble:CMakeLists.txt- adds both tools as shared libs usingrclcpp_components_register_nodepackage.xml- addstf2_eigendependency