Note: This tutorial assumes that you have completed the previous tutorials: rc_visard/Tutorials/Create octomap using rc_visard's onboard SLAM (Docker).
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Navigation with TurtleBot (Docker)

Description: This tutorial describes how to use the rc_visard for navigation with the TurtleBot

Keywords: rc_visard, TurtleBot, navigation, SLAM

Tutorial Level: BEGINNER

Goal

This tutorial shows how to use rc_visard for navigation with the TurtleBot - as demonstrated in the second half of the following "fruitful" video:

(If the video doesn't show up, click here)

Overview

The tutorial makes use of the rc_visard_turtlebot_tutorial demo application to showcase Roboception's rc_visard in a mobile robot scenario utilizing TurtleBot and rc_visard's on-board SLAM module to autonomously navigate in a pre-built map.

Execute

Make sure the octomap has already been captured as explained in rc_visard/Tutorials/CreateOctomapWithSLAM (Docker). The proper setup of the Kobuki Base is indicated if it outputs a sound after it has been started.

This tutorial assumes your user is part of the docker group. If you are not then use sudo for the scripts.

Preparation

For time synchronization a PTP master (ptpd) needs to be installed and enabled in the network with

To start the ptpd server you need to know which ethernet_interface you are using. If you do not know your ethernet interface use ip link or ifconfig. Start this server on the turtlebot.

 $ ip link

 $ sudo apt-get install ptpd

 $ sudo ptpd --masteronly --foreground -i <ethernet_interface>

For more information about the time synchronization via PTP refer to the Roboception rc_visard User Manual - PTP.

Make sure that you are still in the same directory as in the previous tutorial. If you are not then:

 $ cd <path/to/rc_visard_turtlebot_tutorial>

Launch the application on the Turtlebot

In case only one rc_visard is connected to the network launch the navigation demo application on the Turtlebot with

 $ ./docker/run_script.sh "roslaunch rc_visard_turtlebot_tutorial rc_visard_turtlebot_docker_tutorial.launch mapfile:=/map/<name_of_your_mapfile>.ot"

In case the default hostname of the rc_visard (rc_visard) has been changed or several rc_visards are in the network launch the application with the serial number, which can be found using rcdiscover. The argument mapfile needs to be considered like described above if applicable.

 $ rcdiscover

 $ ./docker/run_script.sh "roslaunch rc_visard_turtlebot_tutorial rc_visard_turtlebot_dcoker_tutorial.launch device:=:<serial_number> mapfile:=/map/<name_of_your_mapfile>.ot"

If you are using a SSH-connection use your hostmachine. To connect your hostmachine to the ROS-network on the Turtlebot use this:

 $ export ROS_MASTER_URI=http://<ip_address_of_your_turtlebot>:11311

For more information about ROS-variables see this.

Run rviz on your hostmachine with:

 $ rviz -d $(rospack find rc_visard_turtlebot_tutorial)/cfg/navigation_app.rviz

If the rc_visard_turtlebot_tutorial is not installed on your hostmachine, use this:

 $ rviz -d path/to/rc_visard_turtlebot_tutorial/cfg/navigation_app.rviz

RViz should display a map. The TurtleBot should be located and orientated in the map according to its real life location and orientation.

Select a navigation location in RViz

To send a goal in the map click on the "2D Nav Goal" button in the top area of RViz, click on the map where you want the TurtleBot to drive and drag in the direction the TurtleBot should be pointing at the end. The TurtleBot will drive to the selected location and points into the direction dragged.

Wiki: rc_visard/Tutorials/Navigation with TurtleBot (Docker) (last edited 2019-07-04 09:43:50 by JanNiklasBlind)