Turtlebot_navigation

本文档记录了使用Turtlebot进行SLAM地图构建和自主导航的步骤。首先,通过`roslaunch turtlebot_bringup minimal.launch`启动机器人,并解决Kobuki响应问题。然后,安装必要的软件包并运行gmapping演示,解决OpenNI2Driver错误。在RVIZ中使用键盘或交互标记进行远程操作。最后,介绍了如何进行已知地图的自主导航,并调整launch文件以实现一键启动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Turtlebot_navigation 使用记录

SLAM Map Building with TurtleBot

  • Bring up the robot:

    roslaunch turtlebot_bringup minimal.launch

    reason for kobuki no response: kobuki has no udev rules, to repair this:

    rosrun kobuki_ftdi create_udev_rules

  • Run the gmapping demo app:

    roslaunch turtlebot_navigation gmapping_demo.launch

    note : I met “OpenNI2Driver, No matching device found”
    Solve this:http://answers.ros.org/question/226236/openni2driver-no-matching-device-found/

    sudo apt-get install –reinstall ros-indigo-openni-camera ros-indigo-openni-launch

    Add variable to the environment:

    echo “export TURTLEBOT_3D_SENSOR=kinect” >> .bashrc

    Actually this topic works instead of the topic above.

    Remember that USB2.0 porter is needed.

  • Launch rviz:

    roslaunch turtlebot_rviz_launchers view_navigation.launch

  • Using telop (keyboard, joystick, or other):
    Keyboard Teleop:

    roslaunch turtlebot_teleop keyboard_teleop.launch –screen

    Interactive Markers Teleop(teleoperate the robot from rviz):

    • Installation:

    sudo apt-get install ros-indigo-turtlebot-apps ros-indigo-turtlebot-interactions
    sudo apt-get install ros-indigo-turtlebot-interactive-markers

  • Execute:
    roslaunch turtlebot_interactive_markers interactive_markers.launch –screen
    roslaunch turtlebot_rviz_launchers view_robot.launch
  • Save the map to file:

    rosrun map_server map_saver -f /tmp/my_map

    Note: Do not close the gmapping launch until saving the map.

  • Autonomous Navigation of a Known

    The steps following is the same as the tutorial in the ros wiki
    - Map with TurtleBot

    roslaunch turtlebot_navigation amcl_demo.launch map_file:=/tmp/my_map.yaml
    roslaunch turtlebot_rviz_launchers view_navigation.launch –screen

    • In RVIZ:
      • Localize the TurtleBot:
        1.Click the “2D Pose Estimate” button
        2.Click on the map where the TurtleBot approximately is and drag in the direction the TurtleBot is pointing.
      • To send a goal:
        1.Click the “2D Nav Goal” button
        2.Click on the map where you want the TurtleBot to drive and drag in the direction the TurtleBot should be pointing at the end.

    Combine the Launch file

    In order to launch these steps in one step, changes to the launch file.
    In addition, for farther change, I split the turtlebot_navigation module into my own workspace.
    To launch turtlebot:

    <include file="$(find turtlebot_bringup)/launch/minimal.launch"/>

    Copy the .rviz file in the ~/turtlebot/src/turtlebot_interactions/turtlebot_rviz_launchers/rviz to your workspace. Beside, add this:

    <node name="rviz" pkg="rviz" type="rviz" respawn="true" args="-d $(find YOUR_PROJECT_NAME)/rviz/navigation.rviz"/>

    Notice here, in the real practice, you will find that the rviz often failed to start. So I add the

    respawn = “true”

    in the node. It means that every time it fails to start, the process will retry to start this node again until it starts successfully or you interrupt the process. Another similar one is

    required = “true”

    It means once the node fails to start, the whole process will shut down.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值