ubuntu 20.04 编译和运行SC-LeGo-LOAM

1.搭建文件目录和clone代码

复制代码
mkdir -p SC-LeGo-LOAM/src
cd SC-LeGo-LOAM/src
git clone https://github.com/AbangLZU/SC-LeGO-LOAM.git
cd ..

2.修改代码

需要注意的是原作者使用的是Ouster OS-64雷达,需要更改utility.h文件中适配自己的雷达类型,而本文采用velodyne 16线激光雷达,对utility.h文件要做以下修改

首先是pointCloudTopic

复制代码
extern const string pointCloudTopic = "/os1_points";

替换为

复制代码
extern const string pointCloudTopic = "/velodyne_points";

其次:

复制代码
Ouster OS1-64
extern const int N_SCAN = 64;
extern const int Horizon_SCAN = 1024;
extern const float ang_res_x = 360.0/float(Horizon_SCAN);
extern const float ang_res_y = 33.2/float(N_SCAN-1);
extern const float ang_bottom = 16.6+0.1;
extern const int groundScanInd = 15;

替换为

1)对于16线的VLP雷达,添加

复制代码
extern const int N_SCAN = 16;
extern const int Horizon_SCAN = 1800;
extern const float ang_res_x = 0.2;
extern const float ang_res_y = 2.0;
extern const float ang_bottom = 15.0+0.1;
extern const int groundScanInd = 7;

2)对于64线的VLP雷达,添加

复制代码
extern const int N_SCAN = 64;
extern const int Horizon_SCAN = 2083;
extern const float ang_res_x = 360.0/float(Horizon_SCAN);
extern const float ang_res_y = 26.8/float(N_SCAN-1);
extern const float ang_bottom = 24.8;
extern const int groundScanInd = 55;

最后:

注释掉:

复制代码
#include <opencv/cv.h>

加入:

复制代码
#include <opencv2/opencv.hpp>

并且将

复制代码
#include <pcl/kdtree/kdtree_flann.h>

剪切到#include <opencv2/opencv.hpp>前面去

3.编译和运行launch

复制代码
catkin_make

source ./devel/setup.bash
roslaunch lego_loam run.launch

运行launch的经验

1)包名不管是大写和小写,运行是都是小写

2)包名中的"-" 和"" 的区别,尽量运行 ""

4.下载数据包和运行

这里我使用的是LeGo-LOAM的数据包

数据包链接

运行

复制代码
rosbag play --clock ***.bag

5.效果图

相关推荐
czhc114007566311 分钟前
LINUX99 centos8:网络 yum配置;shell:while [ $i -ne 5 ];do let i++ done
linux
大任视点1 小时前
福莱新材:机器人产业爆发,电子皮肤产能加速释放
机器人
会开花的二叉树2 小时前
彻底搞懂 Linux 基础 IO:从文件操作到缓冲区,打通底层逻辑
linux·服务器·c++·后端
呼啦啦5612 小时前
【Linux】权限
linux·权限
nenchoumi31193 小时前
全网首发!Realsense 全新 D555 相机开箱记录与 D435i、L515、D456 横向测评!
数码相机·计算机视觉·机器人·ros·realsense
晨曦5432103 小时前
零基础12周精通Linux学习计划
linux
linux修理工3 小时前
n1 Armbian OS 24.11.0 noble 安装suricata
linux·运维·服务器
傅里叶3 小时前
sudo启动Flutter程序AMD初始化失败
linux·flutter
笨鸟贤妃3 小时前
Ubuntu 22.04 安装 Docker & Compose 最新最简单完整指南
ubuntu·docker·compose
bug攻城狮3 小时前
CentOS 7 出现 “Could not resolve host“ 错误的修复方案
linux·运维·centos