Skip to content

Port bag_to_pcd to ROS 2#486

Merged
Rayman merged 7 commits intoros-perception:ros2from
vladimirjendrol:ros2-bag-to-pcd
May 13, 2025
Merged

Port bag_to_pcd to ROS 2#486
Rayman merged 7 commits intoros-perception:ros2from
vladimirjendrol:ros2-bag-to-pcd

Conversation

@vladimirjendrol
Copy link
Copy Markdown
Contributor

Usage example:
ros2 run pcl_ros bag_to_pcd --ros-args -p bag_path:=rosbag2_2022_04_14-ped_vehicle/ -p topic_name:=/sensing/lidar/top/rectified/pointcloud -p output_directory:=pcds

Copy link
Copy Markdown
Contributor

@Rayman Rayman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

Can you fix cpplint? I'm seeing a couple of errors in the CI.

Also a question: why did you change the commandline parsing? Previously it would print usage when you entered the wrong amount of arguments.

Comment thread pcl_ros/tools/bag_to_pcd.cpp Outdated
@Rayman
Copy link
Copy Markdown
Contributor

Rayman commented May 7, 2025

Can you resolve the conflicts and implement the conversion with pcl::PointCloud2 (so all fields are saved). Then we can merge this I think

Comment thread pcl_ros/CMakeLists.txt
@Rayman Rayman merged commit 0623695 into ros-perception:ros2 May 13, 2025
3 checks passed
@Rayman
Copy link
Copy Markdown
Contributor

Rayman commented May 13, 2025

Thank you for this feature!

AntoBrandi pushed a commit to AntoBrandi/perception_pcl that referenced this pull request Aug 26, 2025
kubojion added a commit to kubojion/perception_pcl that referenced this pull request Mar 24, 2026
Replace pcl::PointCloud<pcl::PointXYZ> and pcl::PointCloud<pcl::PointXYZRGB>
accumulators with pcl::PCLPointCloud2. The typed approach silently drops all
fields except x/y/z (or rgb) - intensity, ring, timestamps etc. are lost.

Using pcl::PCLPointCloud2 as the accumulator preserves all fields from the
incoming sensor_msgs/PointCloud2 messages, consistent with the approach
requested in ros-perception#486.

Also adds pcl_ros_tf linkage and uses pcl_ros::transformPointCloud for the
fixed-frame transform, removing the inline typed transform helpers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants