RobustFieldAutonomyLab / LeGO-LOAM

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

Hi, why i cannot got .pcd map after I use Ctrl+C to stop the program? I did't see any .pcd file in /tmp/ #173

Closed DeepDuke closed 4 years ago

YushengWHU commented 4 years ago

That's because you didn't set the correct saving directory. You can do it by changing the code in MapOptimization, column 704 if I remember correctly. Also, you can write you own publish node, like a /save_pcd topic, then you can pub the cloud map whenever you wish.

DeepDuke commented 4 years ago

I changed it, but still canot make it work. Ok, I saved map from another topic finally.

nyangshawbin commented 4 years ago

@DeepDuke Hi, could you give me some advice on how to save the map from another topic? I made some changes to the utility.h as well as mapOptimization.cpp as mentioned in #88.

I am running lego loam on a rosbag. Is the .pcd file supposed to be generated after i terminate Lego-loam?

DeepDuke commented 4 years ago

@nyangshawbin hi, you can record the last seconds of topic laser_cloud_surround, and then convert the .bag file into .pcd by running rosrun pcl_ros bag_to_pcd xxx.bag