RobustFieldAutonomyLab / LeGO-LOAM

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

terminate called after throwing an instance of 'pcl::IOException' what(): : [pcl::PCDWriter::writeBinary] Input point cloud has no data! #275

Closed hyunsehyun closed 2 months ago

hyunsehyun commented 9 months ago

this exception keep occurs when make a map (ctrl c). how can i fix this error? An exception has occurred and the final map is not saved. image

hyunsehyun commented 9 months ago

i solved this issue. i changed code mapOptmization.cpp. in line 755, 756, 757, 783(map saving part), change like this pcl::io::savePCDFileASCII("/tmp/finalCloud.pcd", *globalMapCloud);. If you change the path of the pcd validly, the exception will be resolved

DeepDuke commented 9 months ago

It seems globalMapCloud may be empty. I save other pcds successfully after commenting this line like :

// pcl::io::savePCDFileASCII("/tmp/finalCloud.pcd", *globalMapCloud);.
TheSeanParker commented 2 months ago

that is my answers may be help you https://zhuanlan.zhihu.com/p/709189056

hyunsehyun commented 2 months ago

Thank you guys!