Livox-SDK / livox_horizon_loam

Livox horizon porting for loam
Other
306 stars 77 forks source link

Point cloud export #5

Open iseli-c opened 4 years ago

iseli-c commented 4 years ago

I have successfully run the loam processing on the sample rosbag files. How can the oriented results be exported to a point cloud file (such as .pcd?)

PanZhichen commented 4 years ago

you can subscribe the topic "/velodyne_cloud_registered" and register them together to generate a pointclod map

tranminhduc4796 commented 3 years ago

I hope my solution is still soon enough for everyone who've been struggle with this issue. Belows are what I did:

  1. Use package_assembler to stack PointCloud2 messages into one from topic /velodyne_cloud_registered or /laser_cloud_surround (I recommend the first one) and publish the message to a topic.
  2. Develop a subscriber to listen to the topic you published the message. The step 1 and 2 you can follow this guide.
  3. Use package pointcloud_to_pcd to export the message from the topic you defined to .pcd file.
  4. (Optional) In case your map is too large, you can turn on/off your subscriber to generate multiple pcd files. And use pcl_concatenate_points_pcd to concat those .pcd files.

Note: I just realized that you can just use pointcloud_to_pcd to convert messages from /velodyne_cloud_registered or /laser_cloud_surround to .pcd files and then use pcl_concatenate_points_pcd to concat all of them. I haven't tested this way yet but I guess I would work well.