当前位置: 首页 > news >正文

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.效果图

http://www.dtcms.com/a/116687.html

相关文章:

  • C语言基础18
  • 关于可变形卷积
  • STM32单片机入门学习——第24节: [8-2]DMA数据转运DMA+AD多通道
  • Debian 12 服务器搭建Beego环境
  • 汽车BMS技术分享及其HIL测试方案
  • 计算机网络-子网划分试题七
  • PyCharm2024.3.5专业版解决Conda executable is not found问题
  • 信息学奥赛一本通 1929:【04NOIP普及组】火星人 | 洛谷 P1088 [NOIP 2004 普及组] 火星人
  • MIME类型
  • Android中的libs.versions.toml文件
  • Sentinel核心源码分析(下)
  • Python----PaddlePaddle(深度学习框架PaddlePaddle,概述,安装,衍生工具)
  • 红宝书第三十一讲:通俗易懂的包管理器指南:npm 与 Yarn
  • 武汉迅狐科技:AI赋能企业营销,打造智能获客新范式
  • 【软件系统架构】分布式架构
  • 六种蝴蝶昆虫分类-图像分类数据集
  • 【力扣hot100题】(067)寻找两个有序数组的中位数
  • 壹起航:15 年深耕,助力中国工厂出海远航产品出海
  • Valgrind——内存调试和性能分析工具
  • 蓝桥杯真题——前缀总分、遗迹
  • el-table,新增、复制数据后,之前的勾选状态丢失
  • 【深度学习】【目标检测】【Ultralytics-YOLO系列】YOLOV3源码整体结构解析
  • 系统与网络安全------Windows系统安全(11)
  • 【笔记】VS中C#类库项目引用另一个类库项目的方法
  • coze生成流程图和思维导图工作流
  • 【C#知识点详解】Dictionary<TKey,TValue>储存结构详解
  • 初阶数据结构(3)顺序表
  • Electron使用WebAssembly实现CRC-32 STM32校验
  • 爱普生高精度车规晶振助力激光雷达自动驾驶
  • Python基础知识点(函数2)