The TurtleBot 2 system consists of the TurtleBot base and its netbook that rides along with the TurtleBot and a separate remote computer that is used to control the robot. The netbook and computer communicate wirelessly once a network connection is established. This section describes the setup of the system, including the network.
A brief overview of the steps to set up and test the TurtleBot is as follows:
With Ubuntu and the ros-kinetic-desktop-full
installed, the packages for the TurtleBot are installed with the following command:
$ sudo apt-get install ros-kinetic-turtlebot ros-kinetic-turtlebot-apps ros-kinetic-turtlebot-interactions ros-kinetic-turtlebot-simulator ros-kinetic-kobuki-ftdi
To link the Kobuki base to the device folder of Ubuntu, find instructions at the following link:
http://wiki.ros.org/kobuki_ftdi
To set up your netbook battery monitor for the TurtleBot, visit: http://wiki.ros.org/turtlebot/Tutorials/indigo/Netbook%20Battery%20Setup.
There are many tutorials that cover TurtleBot. There is a website devoted to the TurtleBot at http://learn.turtlebot.com/ with many interesting tutorials that cover the various aspects of the TurtleBot with details of setup, testing, and applications. This documentation is for Ubuntu 14.04 and ROS Indigo.
Before we make an attempt to network the TurtleBot to a remote computer, it is wise to test the TurtleBot in the standalone mode to determine whether the software has been installed properly. Now disconnect the netbook from any networks. Once the TurtleBot and its netbook are powered up, you can test software by opening a new terminal window on the netbook and executing the following command:
$ roscore
This should respond with a screen output that ends with the following message:
started core service [/rosout]
If there are no errors indicated in the screen output, the netbook is set up correctly with ROS.
After this, press Ctrl + C and close this terminal window. Open a new one to move the TurtleBot around, as was done previously in simulation. On the netbook, initialize the TurtleBot by typing the roslaunch
command in the new window:
$ roslaunch turtlebot_bringup minimal.launch
Quite a bit of information is shown on the screen as the minimal launch proceeds, but most of this output is not of any concern for now. The ROS Master is the netbook indicated by the following lines:
auto-starting new master ROS_MASTER_URI=http://localhost:11311
This will launch roscore
and initialize the TurtleBot for control when the movement commands are issued. The importance of the ROS_MASTER_URI
variable will be explained when networking the TurtleBot is discussed.
When the minimal launch is successful, you will hear TurtleBot play a jingle to indicate that it is ready.
To move the TurtleBot, open a new terminal window, and launch teleoperation by typing the following command:
$ roslaunch turtlebot_teleop keyboard_teleop.launch
Among other things, you will see a diagram of the control keys used to control the robot on the screen:
Control Your Turtlebot! --------------------------- Moving around: u i o j k l m , .
These are the same keys as discussed previously for the TurtleBot simulator. If all goes well, the TurtleBot will move forward, backward, or turn according to the key pressed on the netbook.
Of course, controlling the TurtleBot from its netbook is not very satisfying. It is done only to see that the TurtleBot software is set up correctly. In the next section, we describe the setup of a network so that the robot can be controlled by a remote computer.
In particular, as discussed in the Using keyboard teleoperation to move TurtleBot section of this chapter, the keyboard keys of a remote computer are used to move TurtleBot after it is connected to a network.