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

Bug fix for Ctrl-C to save map #88

Closed MikeZhu92 closed 5 years ago

MikeZhu92 commented 5 years ago
MikeZhu92 commented 5 years ago

This is a PR for fixing some minor issues in the latest commit. I'm trying to fix the code following the original style adding minimum changes. Feel free to leave comments below.

TixiaoShan commented 5 years ago

Hi @MikeZhu92 Thanks for point this out. Since I edited the file on the Github page, I wasn't able to compile it and caused the bug.

MikeZhu92 commented 5 years ago

Close this PR since bug has been fixed :)

xiaoxueshengyao commented 3 years ago

Hello, thanks for your solution. But I still can not get the finalcloud.pcd with all those fixing. I can get the other three pcd files. No data in the ptr latestGlobalMapKeyFramesDS. Is it my own error? And when I comment // mtx.lock() and // mtx.unlock() in publishGlobalMap(), then I got the finalcloud.pcd file.

MikeZhu92 commented 3 years ago

Hello, thanks for your solution. But I still can not get the finalcloud.pcd with all those fixing. I can get the other three pcd files. No data in the ptr latestGlobalMapKeyFramesDS. Is it my own error? And when I comment // mtx.lock() and // mtx.unlock() in publishGlobalMap(), then I got the finalcloud.pcd file.

There was a major code refactor after this MR and all the commit history were gone. So you might want to check if those changes are still there.