gmapping建图(只有激光)

本文介绍了在没有odom信息的情况下,如何利用ROS的laser_scan_matcher包和GMAPPING节点,通过激光传感器生成odom数据进行建图。详细步骤包括下载laser_scan_matcher、修改turtlebot_navigation包的launch文件,设置静态坐标变换,并调整GMAPPING配置以适应base_link坐标系。
摘要由CSDN通过智能技术生成

声明:这是在turtlebot上跑gmapping成功后修改的(具体教程在创客智造)

1.利用激光生成odom信息

ros中gmapping建图时,需要提供odom和激光信息,但是手中只有激光,这时可以用laser_scan_matcher包模拟出odom信息。
在工作空间catkin_ws/src中:

git clone https://github.com/ccny-ros-pkg/scan_tools.git

下载后编译:

sudo apt-get install ros-kinetic-csm
cd catkin_ws
catkin_make
source	devel/setup.bash

2.修改turtlebot_navigation包里hokuyo_gmapping_demo.aunch文件(自己的gmapping文件)
在上面添加以下代码:

  <node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" 
    args="0.0 0.0 0.0 0.0 0.0 0.0 /base_link /laser 200" />
  <node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="laser_scan_matcher_node" output="screen">

    <param name="fixed_frame" value 
  • 3
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值