用速腾RS16跑LeGO
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:
目录
- 1. 速腾RS16激光雷达驱动配置
- 2. LeGO-LOAM修改
- 2.1 utility.h
- 2.2 imageProjection.cpp
- 2.3 run.launch
- 3. 编译运行
1. 速腾RS16激光雷达驱动配置
见我的上一篇博客
2. LeGO-LOAM修改
2.1 utility.h
- 75行
extern const string pointCloudTopic = "/rslidar_points";
- 191行附近, 添加结构体
PointXYZIRT
struct PointXYZIRT
{PCL_ADD_POINT4D;float intensity;uint16_t ring = 0;double timestamp = 0;EIGEN_MAKE_ALIGNED_OPERATOR_NEW
} EIGEN_ALIGN16;
POINT_CLOUD_REGISTER_POINT_STRUCT(PointXYZIRT, (float, x, x)(float, y, y)(float, z, z)(float, intensity, intensity)(uint16_t, ring, ring)(double, timestamp, timestamp))
2.2 imageProjection.cpp
将所有的PointXYZIR
替换为PointXYZIRT
2.3 run.launch
16行, 添加静态tf
<node pkg="tf" type="static_transform_publisher" name="rslidar_to_base_link" args="0 0 0 0 0 0 /base_link /rslidar 10" />
3. 编译运行
与LeGO-LOAM一样编译运行, 可能其中还有一些要改的地方我忘记了.
我修改的版本见
用速腾RS16跑LeGO
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:
目录
- 1. 速腾RS16激光雷达驱动配置
- 2. LeGO-LOAM修改
- 2.1 utility.h
- 2.2 imageProjection.cpp
- 2.3 run.launch
- 3. 编译运行
1. 速腾RS16激光雷达驱动配置
见我的上一篇博客
2. LeGO-LOAM修改
2.1 utility.h
- 75行
extern const string pointCloudTopic = "/rslidar_points";
- 191行附近, 添加结构体
PointXYZIRT
struct PointXYZIRT
{PCL_ADD_POINT4D;float intensity;uint16_t ring = 0;double timestamp = 0;EIGEN_MAKE_ALIGNED_OPERATOR_NEW
} EIGEN_ALIGN16;
POINT_CLOUD_REGISTER_POINT_STRUCT(PointXYZIRT, (float, x, x)(float, y, y)(float, z, z)(float, intensity, intensity)(uint16_t, ring, ring)(double, timestamp, timestamp))
2.2 imageProjection.cpp
将所有的PointXYZIR
替换为PointXYZIRT
2.3 run.launch
16行, 添加静态tf
<node pkg="tf" type="static_transform_publisher" name="rslidar_to_base_link" args="0 0 0 0 0 0 /base_link /rslidar 10" />
3. 编译运行
与LeGO-LOAM一样编译运行, 可能其中还有一些要改的地方我忘记了.
我修改的版本见