Chapter 3. Driving Around with TurtleBot

It is time for a real ROS robot! A robot called TurtleBot will be discussed and described both in simulation and as the real robot. In this chapter, you will learn how to move TurtleBot as a simulated robot and as the real robot. Even if you do not have a real TurtleBot, the examples in this chapter will teach you the techniques to control a mobile robot.

After introducing TurtleBot 2, we will cover the following topics:

  • Loading the TurtleBot simulation software and using Gazebo with TurtleBot
  • Setting up your system to control a real TurtleBot from its own netbook computer or wirelessly from a remote computer
  • Controlling the movement of the TurtleBot with ROS terminal commands or using the keyboard for control in teleoperation
  • Creating a Python script which, when executed, moves TurtleBot
  • Using rqt tools to provide a GUI that aids the user in analyzing robot programs and also monitoring and controlling the robot
  • Exploring an environment using TurtleBot's odometry data
  • Executing the automatic docking program of TurtleBot
  • Introducing a newer version of TurtleBot, called TurtleBot 3, and describing the simulation and keyboard control of a real TurtleBot 3

Introducing TurtleBot 2

TurtleBot is a mobile robot that can be purchased as a kit or fully assembled. Several companies in North America and around the world sell TurtleBots. The TurtleBot 2 model is shown in the following image:

Introducing TurtleBot 2

Turtlebot 2

A list of manufacturers can be found at http://www.turtlebot.com/manufacturers/.

The main items that comprise the TurtleBot 2 model, from bottom to top in the preceding image, are as follows:

  • A mobile base that also serves as support for the upper stages of the robot
  • A netbook resting on a module plate
  • Another module plate used to hold items
  • A vision sensor with a color camera and 3D depth sensor
  • The top most module plate used to hold items

We will discuss the main items briefly here and provide more details for the base and the netbook later in this chapter. Overall, the TurtleBot model stands about 420 mm (16.5 inches) high and the base is approximately 355 mm (14 inches) in diameter.

The particular base in the authors' TurtleBot is a Kobuki mobile platform produced by the Yujin Robot company. TurtleBot rests on the floor on two wheels and a caster. The base is configured as a differential drive base, which means that when the TurtleBot is moving, the rotational velocity of the wheels can be controlled independently. So, for example, TurtleBot can move back and forth in a straight line when the wheels are driven in the same direction, clockwise (CW) or counterclockwise (CCW), with the same rotational velocity. If the wheels turn at different rotational velocities, TurtleBot can make turns as the velocity of the wheels is controlled. More details are available at http://kobuki.yujinrobot.com/about2/.

A model of a differential drive robot was built in the Building a differential drive robot URDF section in Chapter 2, Creating Your First Two-Wheeled ROS Robot (in Simulation). The base has a battery pack and various power connections for accessories, including a USB connection and power plug for the netbook. TurtleBot also comes with a separate docking station for charging the Kobuki base.

The netbook is essentially a laptop computer but is lightweight with a small screen compared to many laptops. The netbook purchased with TurtleBot has Ubuntu and ROS packages installed. For remote control, the netbook is connected via Wi-Fi to a network and a remote computer. There are USB ports used to plug in the vision sensor or other accessories. The setup of the network is described in the Networking the netbook and remote computer section of this chapter.

The vision sensor, as shown in the preceding image of TurtleBot 2, is an Xbox 360 Kinect sensor manufactured by Microsoft. Originally designed for video games, the Kinect sensor is a popular vision and depth sensor for robotics.

Note

The ROS wiki has a series of tutorials that cover TurtleBots 1, 2, and 3, including the Gazebo simulator, at the following link:

http://wiki.ros.org/Robots/TurtleBot

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.116.159