claydergc / loam_velodyne_kitti

loam velodyne tested with the KITTI dataset
23 stars 7 forks source link

I can't make it. #3

Open Xiangzhaohong opened 5 years ago

Xiangzhaohong commented 5 years ago

/home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp: In member function ‘void loam::MultiScanRegistration::process(const pcl::PointCloud&, const float&)’: /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp:133:76: error: parameter declared ‘auto’ std::for_each(_laserCloudScans.begin(), _laserCloudScans.end(), {v.clear(); }); ^ /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp: In lambda function: /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp:133:80: error: ‘v’ was not declared in this scope std::for_each(_laserCloudScans.begin(), _laserCloudScans.end(), {v.clear(); }); ^ /home/xiangdd/loam_velodynekitti/src/lib/MultiScanRegistration.cpp:133:80: note: suggested alternative: In file included from /usr/include/boost/preprocessor/tuple/elem.hpp:22:0, from /usr/include/boost/preprocessor/arithmetic/add.hpp:21, from /usr/include/boost/mpl/aux/preprocessor/def_paramstail.hpp:66, from /usr/include/boost/mpl/aux/na_spec.hpp:28, from /usr/include/boost/mpl/not.hpp:20, from /usr/include/boost/mpl/assert.hpp:17, from /usr/include/pcl-1.7/pcl/point_traits.h:51, from /usr/include/pcl-1.7/pcl/register_point_struct.h:55, from /usr/include/pcl-1.7/pcl/point_types.h:44, from /home/xiangdd/loam_velodyne_kitti/include/loam_velodyne/common.h:36, from /home/xiangdd/loam_velodyne_kitti/include/loam_velodyne/ScanRegistration.h:37, from /home/xiangdd/loam_velodyne_kitti/include/loam_velodyne/MultiScanRegistration.h:36, from /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp:33: /usr/include/pcl-1.7/pcl/point_types.h:369:1: note: ‘pcl::fields::v’ POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZHSV, ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/boost/smart_ptr/shared_ptr.hpp:42, from /usr/include/boost/shared_ptr.hpp:17, from /usr/include/pcl-1.7/pcl/PCLPointField.h:11, from /usr/include/pcl-1.7/pcl/point_traits.h:48, from /usr/include/pcl-1.7/pcl/register_point_struct.h:55, from /usr/include/pcl-1.7/pcl/point_types.h:44, from /home/xiangdd/loam_velodyne_kitti/include/loam_velodyne/common.h:36, from /home/xiangdd/loam_velodyne_kitti/include/loam_velodyne/ScanRegistration.h:37, from /home/xiangdd/loam_velodyne_kitti/include/loam_velodyne/MultiScanRegistration.h:36, from /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp:33: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = gnu_cxx::normal_iterator<pcl::PointCloud*, std::vector<pcl::PointCloud > >; _Funct = loam::MultiScanRegistration::process(const pcl::PointCloud&, const float&)::lambda0]’: /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp:133:92: required from here /usr/include/c++/4.8/bits/stl_algo.h:4417:14: error: no match for call to ‘(loam::MultiScanRegistration::process(const pcl::PointCloud&, const float&)::lambda0) (pcl::PointCloud&)’ f(*first); ^ /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp:133:68: note: candidates are: std::for_each(_laserCloudScans.begin(), _laserCloudScans.end(), {v.clear(); }); ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/boost/smart_ptr/shared_ptr.hpp:42, from /usr/include/boost/shared_ptr.hpp:17, from /usr/include/pcl-1.7/pcl/PCLPointField.h:11, from /usr/include/pcl-1.7/pcl/point_traits.h:48, from /usr/include/pcl-1.7/pcl/register_point_struct.h:55, from /usr/include/pcl-1.7/pcl/point_types.h:44, from /home/xiangdd/loam_velodyne_kitti/include/loam_velodyne/common.h:36, from /home/xiangdd/loam_velodyne_kitti/include/loam_velodyne/ScanRegistration.h:37, from /home/xiangdd/loam_velodyne_kitti/include/loam_velodyne/MultiScanRegistration.h:36, from /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp:33: /usr/include/c++/4.8/bits/stl_algo.h:4417:14: note: void ()() __f(__first); ^ /usr/include/c++/4.8/bits/stl_algo.h:4417:14: note: candidate expects 1 argument, 2 provided /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp:133:77: note: loam::MultiScanRegistration::process(const pcl::PointCloud&, const float&)::__lambda0 std::for_each(_laserCloudScans.begin(), _laserCloudScans.end(), {v.clear(); }); ^ /home/xiangdd/loam_velodyne_kitti/src/lib/MultiScanRegistration.cpp:133:77: note: candidate expects 0 arguments, 1 provided make[2]: [src/lib/CMakeFiles/loam.dir/MultiScanRegistration.cpp.o] 错误 1 make[1]: [src/lib/CMakeFiles/loam.dir/all] 错误 2 make: *** [all] 错误 2

jianrui1 commented 5 years ago

hi,do you succeed in kitti data ?I got a bad result. Can you share your code to me?

claydergc commented 5 years ago

Helllo @jianrui1 I did not obtained the same results shown in the KITTI Benchmark. The code I wrote here still needs a change in the time stamps when each transform is returned. I haven't had time to modify the code, but it should improve the results.

jianrui1 commented 5 years ago

@claydergc Thank you for your reply. In your github,your running method is:./main "KITTI Dataset Path" "NumberOfSequence". I want to know the KITTI Dataset is raw data ?or odometry sequence? Can you give me a example about how to run in trunly dataset?

claydergc commented 5 years ago

@Xiangzhaohong sorry for the delay in answering. The error is produced because you have to set the compiler to use C++14 as laboshinl's code. It seems also that the PCL version is producing problems. I used PCL 1.8.