Convert PointCloud2 in bag file to pcd

asked 2016-04-07 09:24:06 -0500

rosGSCOP gravatar image

Hi. I wanted to convert a message of type sensor_msgs/PointCloud2 stored in a bag file to pcd by using the command:
rosrun pcl_ros bag_to_pcd input_file.bag /topic output_directory
My problem is that the final file 0.000000000.pcd only contains the 256 points. It seems like the precedent streams are erased. Instead of having 2064 + 1226 + 256 =3546 points, I got only 256.

Got 2064 data points in frame /ORB_SLAM/World with the following fields: x y z
Data saved to /home/chews/pcd_ORB/bag/0.000000000.pcd
Got 1226 data points in frame /ORB_SLAM/World with the following fields: x y z
Data saved to /home/chews/pcd_ORB/bag/0.000000000.pcd
Got 256 data points in frame /ORB_SLAM/World with the following fields: x y z
Data saved to /home/chews/pcd_ORB/bag/0.000000000.pcd

Does anyone know how to save all the data?

edit retag flag offensive close merge delete