turtlebot2进行slam建图 导航(仿真和实战)

step1:slam建图(仿真)

此文主要参考:https://blog.youkuaiyun.com/m0_37433067/article/details/79999505

step2:slam导航(仿真)

主要参考:https://blog.youkuaiyun.com/yangziluomu/article/details/70145675
主要参考第三节,加载地图,也可以按照第一个链接的方法做。

step3:slam建图(实战)

此文主要参考我的同事:
https://blog.youkuaiyun.com/qq_37377240/article/details/89597752

  • question1:然后可能按照步骤来会出现一切正常,但收不到激光数据的情况,这种情况可能是由于软件包版本的原因:请将软件包https://github.com/ncnynl/rplidar_ros.git 换成 https://github.com/Slamtec/rplidar_ros.git 然后重新编译一下。
  • question2: 可能这个地方不用改
    在这里插入图片描述

step4:slam导航(实战)

此部分主要参考:https://www.ncnynl.com/archives/201609/815.html

step1:启动Turtlebot2

roslaunch turtlebot_bringup minimal.launch

step2:启动amcl程序

roslaunch turtlebot_navigation amcl_demo.launch map_file:=/home/daniel/map/turtlebot_test_map.yaml

step3:启动rviz

roslaunch turtlebot_rviz_launchers view_navigation.launch --screen

[ WARN] [1522398152.672156241]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: Could not find a connection between ‘map’ and ‘base_footprint’ because they are not part of the same tree.Tf has two or more unconnected trees… canTransform returned after 0.105784 timeout was 0.1.

这时我们需要在acml_demo.launch文件中加上

 <node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0.0 0.0 0.0 0 0 0.0 /map /odom 1000"/>

然后再次运行第二步:这时不会出现warning了。rviz里也不会出现Fixed Framed [map] does not exist
这样的错误了

step4:开始导航

  • 在地图上的位置是已知的turtlebot。你将看到一个集合的箭头显示的turtlebot位置。

  • 发送导航目标。单击2D Nav Goal2D导航目标按钮。

  • 在你想要的turtlebot驱动和阻力的方向,turtlebot应该指向最后点击地图。

  • 注意:如果路径或目标被阻止,它会失败。

  • 注意:如果你想达到它的目标之前停止turtlebot,在它的当前位置发送一个目标。

  • 中断进程并关闭终端。

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值