基于速腾雷达( robosense )实现 Lego-LOAM三维实时建图

1、代码包

雷达包:

https://github.com/RoboSense-LiDAR/ros_rslidar

Lego_LOAM算法包:

https://github.com/RobustFieldAutonomyLab/LeGO-LOAM

2、环境配置

<1>  雷达连接配置,这里参考我的另一篇教程中的第一节——>网络配置

                ROS1环境Robosense雷达建图调试https://blog.csdn.net/weixin_48178539/article/details/119209958?spm=1001.2014.3001.5501

<2>  工程文件编译

         将两个功能包 git到工作空间src下之后,此时需按照LeGO-LOAM中gtsam 的编译要求进行环境配置,此时也可将  gtsam  git到当前目录下进行编译安装(安装后将gtsam 包删除即可,不删除则应使用catkin_make_isolated命令编译)——>最后进行catkin_make编译工作空间。

<3>   编译过程中可能出现的问题

                问题1:——>解决方法:见博客    Lego-loam编译安装与运行

 

3、实时建图

         由于雷达话题    rslidar_points——>velodyne_points  不同,无法建立转换关系,本博客提供两种方案 ( 推荐方法二 ):

<1>  方法一:修改LeGO-LOAM中的run.launch文件

<launch>
    
    <!--- Sim Time -->
    <param name="/use_sim_time" value="false" />
    <node pkg="nodelet" type="nodelet" name="pcl_manager" args="manager" output="screen" />
    
    <!-- Run a passthrough filter to clean NaNs -->
  <node pkg="nodelet" type="nodelet" name="passthrough" args="load pcl/PassThrough pcl_manager" output="screen">
    <remap from="~input" to="/rslidar_points" />
    <remap from="/passthrough/output" to="/velodyne_points" />
    
    <rosparam>
      filter_field_name: z
      filter_limit_negative: True
    </rosparam>
 
   <rosparam>
      filter_field_name: x
      filter_limit_negative: True
    </rosparam>
 
   <rosparam>
      filter_field_name: y
      filter_limit_negative: True
    </rosparam>
   </node>

    <!--- Run Rviz-->
    <node pkg="rviz" type="rviz" name="rviz" args="-d $(find lego_loam)/launch/test.rviz" />

    <!--- TF -->
    <node pkg="tf" type="static_transform_publisher" name="camera_init_to_map"  args="0 0 0 1.570795   0        1.570795 /map    /camera_init 10" />
    <node pkg="tf" type="static_transform_publisher" name="base_link_to_camera" args="0 0 0 -1.570795 -1.570795 0        /camera /base_link   10" />

    <!--- 根据雷达和小车相对位置确定 -->
    <!--node pkg="tf" type="static_transform_publisher" name="base_link_to_velodyne" args="0 0 0 0 0 0      /base_link  /velodyne 10" /-->  

    <!--- LeGO-LOAM -->    
    <node pkg="lego_loam" type="imageProjection"    name="imageProjection"    output="screen"/>
    <node pkg="lego_loam" type="featureAssociation" name="featureAssociation" output="screen"/>
    <node pkg="lego_loam" type="mapOptmization"     name="mapOptmization"     output="screen"/>
    <node pkg="lego_loam" type="transformFusion"    name="transformFusion"    output="screen"/>

</launch>

<2>  方法二:修改ros_rslidar中rslidar_pointcloud下面src中的convert.cc文件,更改robosense雷达发布的话题名称

<3>  两种方法中,Rviz中都会出现点云漂移现象,具体优化方法可参考这篇博客

                     愤怒的马铃薯:关于lego-loam的总结(一)

4、建图运行及效果

roslaunch ros_rslidar rs_lidar_16.launch

roslaunch lego_loam run.launch

5、相关博客

1、速腾16线激光雷达运行LOAM、A-LOAM和LeGO-LOAM(方法二)

2、学习笔记之——激光雷达SLAM(LOAM系列的复现与学习)

3、在用robosense的rslidar(16线)运行lego-loam遇到的问题总结(方法一)

       lego-LOAM跑自己的数据包无法显示全局点云地图解决(速腾聚创RS-LiDAR-16 雷达 )

  • 6
    点赞
  • 53
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值