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

 

posted @ 2018-10-09 08:09  LIN_Weilin  阅读(1834)  评论(0编辑  收藏  举报