Ask Your Question
0

bag file to pcd files

asked 2016-05-24 00:43:02 -0600

noman gravatar image

updated 2016-05-24 02:01:48 -0600

gvdhoorn gravatar image

when i try to convert bag file using the following command to pcd file then i get multiple pcd files. is this correct ? How can i obtain single pcd file from a bag file.

rosrun pcl_ros bag_to_pcd <input_file.bag> <topic> <output_directory>
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-10-04 08:28:40 -0600

mjcarroll gravatar image

The bag_to_pcd file will use the topic that you choose as input, and turn each sensor_msgs/PointCloud2 message on that topic into it's own PCD file.

If you want a single PCD file, you need to use a tool like the point_cloud_assembler ( http://wiki.ros.org/laser_assembler ) to concatenate all of the clouds together into a single cloud. You can then use the bag_to_pcd tool to save that new single cloud.

edit flag offensive delete link more
0

answered 2016-10-03 04:30:33 -0600

Kailegh gravatar image

I do not understand your question, you want to obtain 1 big pointcloud containing every pointcloud in the rosbag? If that is what you want you can simply add the pointclouds.

rosrun pcl_ros bag_to_pcd <input_file.bag> <topic> <output_directory>

That will get every single topic that the rosbag would publish and save it in the directory you want.

edit flag offensive delete link more

Comments

How does you answer explain anything ? You just repeated the question back again

rosrun pcl_ros bag_to_pcd <input_file.bag> <topic> <output_directory>

Outputs many .pcd files out of a .bag file and OP wants to have a single output that accumulates all the .pcd's into a single one.

"You can simply add the pointclouds." oh thank you for explaining how to do this as well...

kaanoguzhan gravatar image kaanoguzhan  ( 2020-07-12 12:23:06 -0600 )edit

is there anyway to run this command: rosrun pcl_ros bag_to_pcd <input_file.bag> <topic> <output_directory> in python script rather than in terminal?

Farid gravatar image Farid  ( 2020-10-15 08:10:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-05-24 00:43:02 -0600

Seen: 6,802 times

Last updated: Oct 04 '16