LeGO-LOAM建图

1 安装LeGO-LOAM

LeGO-LOAM需要依赖 ROS 环境 和 gtsam
遇到github下载慢的情况,可以从gitee导入仓库下载

1.1安装依赖项

wget wget -O ~/software/gtsam.zip https://github.com/borglab/gtsam/archive/4.0.0-alpha2.zip
cd ~/software && unzip gtsam.zip -d ~/software/
cd ~/software/gtsam-4.0.0-alpha2/
mkdir build && cd build
cmake ..
sudo make install

1.2安装下载编译源码

cd ~/catkin_ws/src
git clone https://github.com/RobustFieldAutonomyLab/LeGO-LOAM.git
cd ..
catkin_make -j1

2 编译报错

在这里插入图片描述

***:In function ‘void pcl_conversions::toPCL(const Header&, pcl::PCLHeader&)’:
***:error: cannot bind non-const lvalue reference of type 'uint64_t &{aka long unsigned int&}' to an rvalue of type 'uint64_t {aka long usigned int}'
    toPCL(header.stamp,pcl_header.stamp);

2.1解决方法

从github找到相似问题,从下面评论可以得到
安装Point Cloud Library 1.8.1
在这里插入图片描述

2.2解决方法(不确定是否正确只是编译通过)

80:const std::uint64_t & pcl_stamp 改为std::uint64_t pcl_stamp
在这里插入图片描述

3运行LeGO-LOAM

3.1运行demo

启动LeGO-LOAM

roslaunch lego_loam run.launch

运行参考作者的bag

rosbag play lego-loam-demo-2017-06-08-15-49-45_0.bag --clock --topic /velodyne_points /imu/data

在这里插入图片描述

参考网站

参考网站:开源自主导航小车MickX4(八)LeGo-LOAM 室外3D建图
参考网站:https://github.com/ros-perception/perception_pcl/issues/376
参考网站:https://github.com/ros-perception/ar_track_alvar/issues/88

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值