LeGO-LOAM编译、运行

LeGO-LOAM Github 地址:https://github.com/RobustFieldAutonomyLab/LeGO-LOAM

相关依赖安装

1. ROS

2.GTSAM

  • 下载gtsam源码
git clone https://bitbucket.org/gtborg/gtsam.git
  • 编译安装gtsam
mkdir build
cd build
cmake ..
make check (可以省略)
make install

下载LeGO-LOAM

cd ~/catkin_ws/src(若没有ROS工作空间,新建一个) 
git clone https://github.com/RobustFieldAutonomyLab/LeGO-LOAM.git

编译LeGO-LOAM

cd ~/catkin_ws
catkin_make -j1

注意:编译时可能会遇到如下错误

解决方法: 将/usr/local/lib/cmake/GTSAM/GTSAMConfig.cmake:17 行的find_dependency改成find_package
该文件可能没有权限修改,首先修改权限给它写权限

sudo chmod a+w GTSAMConfig.cmake

运行LeGO-LOAM

roslaunch lego_loam run.launch

打开数据文件

rosbag play *.bag --clock --topic /velodyne_points /imu/data

注意:
LeGO-LOAM 以/velodyne_points和/imu/data为topic分别订阅激光雷达和imu数据,也可以没有imu数据
LeGO-LOAM默认的激光雷达数据为VLP-16类型
若使用其他类型激光雷达数据,需要在utility.h中修改如下图所示的激光雷达相关参数


运行结果

猜你喜欢

转载自www.cnblogs.com/zhangjcblog/p/10580683.html