Preface
Printed vs PDF Versions of the Book
Changes Since Electric and Fuerte
1. Purpose of this Book
2. Real and Simulated Robots
2.1 Gazebo, Stage, and the ArbotiX Simulator
2.2 Introducing the TurtleBot, Maxwell and Pi Robot
3. Operating Systems and ROS Versions
3.1 Installing Ubuntu Linux
3.2 Getting Started with Linux
3.3 A Note about Updates and Upgrades
4. Reviewing the ROS Basics
4.1 Installing ROS
4.2 Installing rosinstall
4.3 Creating Your Personal ROS Directory
4.4 Working through the Official ROS Tutorials
4.5 RViz: The ROS Visualization Tool
4.6 Using ROS Parameters in your Programs
4.7 Using rqt_reconfigure (formerly dynamic_reconfigure) to set ROS Parameters
4.8 Networking Between a Robot and a Desktop Computer
4.8.1 Time Synchronization
4.8.2 ROS Networking using Zeroconf
4.8.2.1 Testing Connectivity
4.8.2.2 Setting the ROS_MASTER_URI and ROS_HOSTNAME Variables
4.8.2.3 Opening New Terminals
4.8.2.4 Running Nodes on both Machines
4.8.3 ROS Networking across the Internet
4.9 ROS Recap
4.10 The Official ROS Cheat Sheet
4.11 What is a ROS Application?
4.12 Installing Packages with SVN, Git, and Mercurial
4.12.1 SVN
4.12.2 Git
4.12.3 Mercurial
4.13 Removing Packages from your Personal ROS Directory
4.14 How to Find Third-Party ROS Packages
4.14.1 Searching the ROS Wiki
4.14.2 Using the roslocate Command
4.14.3 Browsing the ROS Software Index
4.14.4 Doing a Google Search
4.15 Getting Further Help with ROS
5. Installing the ros-by-example Code
5.1 Installing the Prerequisites
5.2 Cloning the ros-by-example Repository
5.3 About the Code Listings in this Book
6. Installing the Arbotix Simulator
6.1 Installing the Simulator
6.2 Testing the Simulator
6.3 Running the Simulator with Your Own Robot
7. Controlling a Mobile Base
7.1 Units and Coordinate Systems
7.2 Levels of Motion Control
7.2.1 Motors, Wheels, and Encoders
7.2.2 Motor Controllers and Drivers
7.2.3 The ROS Base Controller
7.2.4 Frame-Base Motion using the move_base ROS Package
7.2.5 SLAM using the gmapping and amcl ROS Packages
7.2.6 Semantic Goals
7.2.7 Summary
7.3 Twisting and Turning with ROS
7.3.1 Example Twist Messages
7.3.2 Monitoring Robot Motion using RViz
7.4 Calibrating Your Robot's Odometry
7.4.1 Linear Calibration
7.4.2 Angular Calibration
7.5 Sending Twist Messages to a Real Robot
7.6 Publishing Twist Messages from a ROS Node
7.6.1 Estimating Distance and Rotation Using Time and Speed
7.6.2 Timed Out-and-Back in the ArbotiX Simulator
7.6.3 The Timed Out-and-Back Script
7.6.4 Timed Out and Back using a Real Robot
7.7 Are We There Yet? Going the Distance with Odometry
7.8 Out and Back Using Odometry
7.8.1 Odometry-Based Out and Back in the ArbotiX Simulator
7.8.2 Odometry-Based Out and Back Using a Real Robot
7.8.3 The Odometry-Based Out-and-Back Script
7.8.4 The /odom Topic versus the /odom Frame
7.9 Navigating a Square using Odometry
7.9.1 Navigating a Square in the ArbotiX Simulator
7.9.2 Navigating a Square using a Real Robot
7.9.3 The nav_square.py Script
7.9.4 The Trouble with Dead Reckoning
7.10 Teleoperating your Robot
7.10.1 Using the Keyboard
7.10.2 Using a Logitech Game Pad
7.10.3 Using the ArbotiX Controller GUI
7.10.4 TurtleBot Teleoperation Using Interactive Markers
7.10.5 Writing your Own Teleop Node
8. Navigation, Path Planning and SLAM
8.1 Path Planning and Obstacle Avoidance using move_base
8.1.1 Specifying Navigation Goals Using move_base
8.1.2 Configuration Parameters for Path Planning
8.1.2.1 base_local_planner_params.yaml
8.1.2.2 costmap_common_params.yaml
8.1.2.3 global_costmap_params.yaml
8.1.2.4 local_costmap_params.yaml
8.2 Testing move_base in the ArbotiX Simulator
8.2.1 Point and Click Navigation in RViz
8.2.2 Navigation Display Types for RViz
8.2.3 Navigating a Square using move_base
8.2.4 Avoiding Simulated Obstacles
8.2.5 Setting Manual Goals with Obstacles Present
8.3 Running move_base on a Real Robot
8.3.1 Testing move_base without Obstacles
8.3.2 Avoiding Obstacles using the TurtleBot's Fake Laser Scan
8.4 Map Building using the gmapping Package
8.4.1 Laser Scanner or Depth Camera?
8.4.2 Collecting and Recording Scan Data
8.4.3 Creating the Map
8.4.4 Creating a Map from Bag Data
8.4.5 Can I Extend or Modify an Existing Map?
8.5 Navigation and Localization using a Map and amcl
8.5.1 Testing amcl with Fake Localization
8.5.2 Using amcl with a Real Robot
8.5.3 Fully Autonomous Navigation
8.5.4 Running the Navigation Test in Simulation
8.5.5 Understanding the Navigation Test Script
8.5.6 Running the Navigation Test on a Real Robot
8.5.7 What's Next?
9. Speech Recognition and Synthesis
9.1 Installing PocketSphinx for Speech Recognition
9.2 Testing the PocketSphinx Recognizer
9.3 Creating a Vocabulary
9.4 A Voice-Control Navigation Script
9.4.1 Testing Voice-Control in the ArbotiX Simulator
9.4.2 Using Voice-Control with a Real Robot
9.5 Installing and Testing Festival Text-to-Speech
9.5.1 Using Text-to-Speech within a ROS Node
9.5.2 Testing the talkback.py script
10. Robot Vision
10.1 OpenCV, OpenNI and PCL
10.2 A Note about Camera Resolutions
10.3 Installing and Testing the ROS Camera Drivers
10.3.1 Installing the OpenNI Drivers
10.3.2 Installing Webcam Drivers
10.3.3 Testing your Kinect or Xtion Camera
10.3.4 Testing your USB Webcam
10.4 Installing OpenCV on Ubuntu Linux
10.5 ROS to OpenCV: The cv_bridge Package
10.6 The ros2opencv2.py Utility
10.7 Processing Recorded Video
10.8 OpenCV: The Open Source Computer Vision Library
10.8.1 Face Detection
10.8.2 Keypoint Detection using GoodFeaturesToTrack
10.8.3 Tracking Keypoints using Optical Flow
10.8.4 Building a Better Face Tracker
10.8.5 Dynamically Adding and Dropping Keypoints
10.8.6 Color Blob Tracking (CamShift)
10.9 OpenNI and Skeleton Tracking
10.9.1 Viewing Skeletons in RViz
10.9.2 Accessing Skeleton Frames in your Programs
10.10 PCL Nodelets and 3D Point Clouds
10.10.1 The PassThrough Filter
10.10.2 Combining More than One PassThrough Filter
10.10.3 The VoxelGrid Filter
11. Combining Vision and Base Control
11.1 A Note about Camera Coordinate Axes
11.2 Object Tracker
11.2.1 Testing the Object Tracker with rxplot
11.2.2 Testing the Object Tracker with a Simulated Robot
11.2.3 Understanding the Object Tracker Code
11.2.4 Object Tracking on a Real Robot
11.3 Person Follower
11.3.1 Testing the Follower Application in Simulation
11.3.2 Understanding the Follower Script
11.3.3 Running the Follower Application on a TurtleBot
11.3.4 Running the Follower Node on a Filtered Point Cloud
12. Dynamixel Servos and ROS
12.1 A TurtleBot with a Pan-and-Tilt Head
12.2 Choosing a Dynamixel Hardware Controller
12.3 A Note Regarding Dynamixel Hardware
12.4 Choosing a ROS Dynamixel Package
12.5 Understanding the ROS JointState Message Type
12.6 Controlling Joint Position, Speed and Torque
12.6.1 Setting Servo Position
12.6.2 Setting Servo Speed
12.6.3 Controlling Servo Torque
12.7 Checking the USB2Dynamixel Connection
12.8 Setting the Servo Hardware IDs
12.9 Configuring and Launching dynamixel_controllers
12.9.1 The dynamixel_controllers Configuration File
12.9.2 The dynamixel_controllers Launch File
12.10 Testing the Servos
12.10.1 Starting the Controllers
12.10.2 Monitoring the Robot in RViz
12.10.3 Listing the Controller Topics and Monitoring Joint States
12.10.4 Listing the Controller Services
12.10.5 Setting Servo Position, Speed and Torque
12.10.6 Using the relax_all_servos.py Script
12.11 Tracking a Visual Target
12.11.1 Tracking a Face
12.11.2 The Head Tracker Script
12.11.3 Tracking Colored Objects
12.11.4 Tracking Manually Selected Targets
12.12 A Complete Head Tracking ROS Application
13. Where to Go Next?