RobustFieldAutonomyLab / LeGO-LOAM

LeGO-LOAM: Lightweight and Ground-Optimized Lidar Odometry and Mapping on Variable Terrain
BSD 3-Clause "New" or "Revised" License
2.36k stars 1.11k forks source link

How to collect pose estimation data #130

Closed lolito94 closed 4 years ago

lolito94 commented 4 years ago

Hi guys, I have a question for you, I want to collect the data coming from the pose estimation and i don't know how to do it. Inside RViz I saw that "Trajectory" is showed through the topic /key_pose_origin which is a sensor_msgs/PointCloud2 topic type. Now I would like to save these messages as a file( for example a bag file). Then after this recording phase I want to convert this file into a pcap file. Is it possible? If yes how?

Scrumantic commented 4 years ago

To do this I subscribe to the /integrated_to_init odometry topic. After this you can save it to a point cloud structure and save this structure as .pcd file using the pcl::io::savePCDFileBinary function. I'm certain that you can save it in other kinds of file extension.