背景:前段时间使用实验室的小车进行SLAM与导航的实操时,编译hdl出现的问题,去年还没有出现过,版本更新之后出现的问题。花了很多时间解决这个问题,在网上也没有搜索到解决问题的方法,所以希望用这篇文章给需要的人提供帮助,节省时间。
问题展示:因为问题已经解决,当时也没有截屏之类的,所以在这里简短描述以下error:
error: ‘shared_ptr’ in namespace ‘pcl’ does not name a template type typedef pcl::shared_ptr< pcl::VoxelGrid > Ptr; error: ‘shared_ptr’ in namespace ‘pcl’ does not name a template type typedef pcl::shared_ptr< const pcl::VoxelGrid > ConstPtr;
解决办法:
1.进入到ndt_omp的include文件夹,我的文件路径:/home/.../catkin_ws/src/ndt_omp/include(仅供参考)
2.找到gicp_omp.h文件、ndt_omp.h文件、voxel_grid_covariance_omp.h文件
3.将上述三个文件中的pcl::shared_ptr改为boost::shared_ptr