Ubuntu16.04跑loam_velodyne


Ubuntu16.04,ros kinetic

其实按照github上的README.md来编译就好

cd ~/catkin_ws/src

git clone https://github.com/laboshinl/loam_velodyne.git

cd ..

catkin_make -DCMAKE_BUILD_TYPE=Release

 

报错:

/loam_velodyne-master/src/lib/LaserMapping.cpp:149:28: error: ‘downSizeFilterMap’ was not declared in this scope
downSizeFilterMap().setLeafSize(fParam, fParam, fParam);

在github的issue中查找报错,找到loam_velodyne-master/src/lib/LaserMapping.cpp下的149行,将这几行注释掉

/*
/// unused code 
if (privateNode.getParam("mapFilterSize", fParam))
{
if (fParam < 0.001)
{
ROS_ERROR("Invalid mapFilterSize parameter: %f (expected >= 0.001)", fParam);
return false;
}
else
{
downSizeFilterMap().setLeafSize(fParam, fParam, fParam);
ROS_INFO("Set map down size filter leaf size: %g", fParam);
}
}
*/

 

再source一下就好了:

source ~/catkin_ws/devel/setup.bash

 

 

 

Reference:

https://github.com/laboshinl/loam_velodyne/tree/master

https://github.com/laboshinl/loam_velodyne/pull/84/commits/d7c9359f6c643a4b2d960ec14e3a303dcf102ccd

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM