|  | 
 
| ROS By Example
 
 
   
 
  ROS By Example.pdf.pdf
(8.32 MB, 下载次数: 25) 
 Main Chapter Headings
 Preface................................................................................................................vii
 Printed vs PDF Versions of the Book...............................................................ix
 Changes Since Electric and Fuerte...................................................................xi
 1. Purpose of this Book........................................................................................1
 2. Real and Simulated Robots.............................................................................3
 3. Operating Systems and ROS Versions..........................................................5
 4. Reviewing the ROS Basics..............................................................................9
 5. Installing the ros-by-example Code.............................................................27
 6. Installing the Arbotix Simulator..................................................................31
 7. Controlling a Mobile Base............................................................................35
 8. Navigation, Path Planning and SLAM........................................................73
 9. Speech Recognition and Synthesis.............................................................119
 10. Robot Vision...............................................................................................135
 11. Combining Vision and Base Control.......................................................189
 12. Dynamixel Servos and ROS......................................................................205
 13. Where to Go Next?....................................................................................231
 
 Contents
 Prefacevii
 Printed vs PDF Versions of the Bookix
 Changes Since Electric and Fuertexi
 1. Purpose of this Book1
 2. Real and Simulated Robots3
 2.1 Gazebo, Stage, and the ArbotiX Simulator3
 2.2 Introducing the TurtleBot, Maxwell and Pi Robot4
 3. Operating Systems and ROS Versions5
 3.1 Installing Ubuntu Linux5
 3.2 Getting Started with Linux6
 3.3 A Note about Updates and Upgrades7
 4. Reviewing the ROS Basics9
 4.1 Installing ROS9
 4.2 Installing rosinstall9
 4.3 Creating Your Personal ROS Directory9
 4.4 Working through the Official ROS Tutorials11
 4.5 RViz: The ROS Visualization Tool11
 4.6 Using ROS Parameters in your Programs12
 4.7 Using rqt_reconfigure (formerly dynamic_reconfigure) to set ROS Parameters12
 4.8 Networking Between a Robot and a Desktop Computer14
 4.8.1 Time Synchronization14
 4.8.2 ROS Networking using Zeroconf14
 4.8.2.1 Testing Connectivity15
 4.8.2.2 Setting the ROS_MASTER_URI and ROS_HOSTNAME Variables15
 4.8.2.3 Opening New Terminals16
 4.8.2.4 Running Nodes on both Machines17
 4.8.3 ROS Networking across the Internet18
 4.9 ROS Recap18
 4.10 The Official ROS Cheat Sheet19
 4.11 What is a ROS Application?19
 4.12 Installing Packages with SVN, Git, and Mercurial20
 4.12.1 SVN21
 4.12.2 Git21
 4.12.3 Mercurial21
 4.13 Removing Packages from your Personal ROS Directory22
 4.14 How to Find Third-Party ROS Packages22
 4.14.1 Searching the ROS Wiki23
 4.14.2 Using the roslocate Command23
 4.14.3 Browsing the ROS Software Index24
 4.14.4 Doing a Google Search24
 4.15 Getting Further Help with ROS25
 5. Installing the ros-by-example Code27
 5.1 Installing the Prerequisites27
 5.2 Cloning the ros-by-example Repository27
 5.3 About the Code Listings in this Book29
 6. Installing the Arbotix Simulator31
 6.1 Installing the Simulator31
 6.2 Testing the Simulator31
 6.3 Running the Simulator with Your Own Robot33
 7. Controlling a Mobile Base35
 7.1 Units and Coordinate Systems35
 7.2 Levels of Motion Control35
 7.2.1 Motors, Wheels, and Encoders36
 7.2.2 Motor Controllers and Drivers36
 7.2.3 The ROS Base Controller36
 7.2.4 Frame-Base Motion using the move_base ROS Package37
 7.2.5 SLAM using the gmapping and amcl ROS Packages37
 7.2.6 Semantic Goals38
 7.2.7 Summary38
 7.3 Twisting and Turning with ROS39
 7.3.1 Example Twist Messages39
 7.3.2 Monitoring Robot Motion using RViz40
 7.4 Calibrating Your Robot's Odometry42
 7.4.1 Linear Calibration43
 7.4.2 Angular Calibration44
 7.5 Sending Twist Messages to a Real Robot45
 7.6 Publishing Twist Messages from a ROS Node46
 7.6.1 Estimating Distance and Rotation Using Time and Speed47
 7.6.2 Timed Out-and-Back in the ArbotiX Simulator47
 7.6.3 The Timed Out-and-Back Script48
 7.6.4 Timed Out and Back using a Real Robot53
 7.7 Are We There Yet? Going the Distance with Odometry55
 7.8 Out and Back Using Odometry57
 7.8.1 Odometry-Based Out and Back in the ArbotiX Simulator57
 7.8.2 Odometry-Based Out and Back Using a Real Robot58
 7.8.3 The Odometry-Based Out-and-Back Script60
 7.8.4 The /odom Topic versus the /odom Frame65
 7.9 Navigating a Square using Odometry66
 7.9.1 Navigating a Square in the ArbotiX Simulator66
 7.9.2 Navigating a Square using a Real Robot67
 7.9.3 The nav_square.py Script69
 7.9.4 The Trouble with Dead Reckoning69
 7.10 Teleoperating your Robot69
 7.10.1 Using the Keyboard70
 7.10.2 Using a Logitech Game Pad71
 7.10.3 Using the ArbotiX Controller GUI71
 7.10.4 TurtleBot Teleoperation Using Interactive Markers72
 7.10.5 Writing your Own Teleop Node72
 8. Navigation, Path Planning and SLAM73
 8.1 Path Planning and Obstacle Avoidance using move_base 73
 8.1.1 Specifying Navigation Goals Using move_base74
 8.1.2 Configuration Parameters for Path Planning75
 8.1.2.1 base_local_planner_params.yaml76
 8.1.2.2 costmap_common_params.yaml77
 8.1.2.3 global_costmap_params.yaml78
 8.1.2.4 local_costmap_params.yaml78
 8.2 Testing move_base in the ArbotiX Simulator79
 8.2.1 Point and Click Navigation in RViz83
 8.2.2 Navigation Display Types for RViz84
 8.2.3 Navigating a Square using move_base84
 8.2.4 Avoiding Simulated Obstacles91
 8.2.5 Setting Manual Goals with Obstacles Present92
 8.3 Running move_base on a Real Robot92
 8.3.1 Testing move_base without Obstacles93
 8.3.2 Avoiding Obstacles using the TurtleBot's Fake Laser Scan94
 8.4 Map Building using the gmapping Package96
 8.4.1 Laser Scanner or Depth Camera?96
 8.4.2 Collecting and Recording Scan Data99
 8.4.3 Creating the Map100
 8.4.4 Creating a Map from Bag Data101
 8.4.5 Can I Extend or Modify an Existing Map?103
 8.5 Navigation and Localization using a Map and amcl103
 8.5.1 Testing amcl with Fake Localization103
 8.5.2 Using amcl with a Real Robot105
 8.5.3 Fully Autonomous Navigation108
 8.5.4 Running the Navigation Test in Simulation109
 8.5.5 Understanding the Navigation Test Script111
 8.5.6 Running the Navigation Test on a Real Robot116
 8.5.7 What's Next?117
 9. Speech Recognition and Synthesis119
 9.1 Installing PocketSphinx for Speech Recognition119
 9.2 Testing the PocketSphinx Recognizer120
 9.3 Creating a Vocabulary122
 9.4 A Voice-Control Navigation Script124
 9.4.1 Testing Voice-Control in the ArbotiX Simulator128
 9.4.2 Using Voice-Control with a Real Robot129
 9.5 Installing and Testing Festival Text-to-Speech130
 9.5.1 Using Text-to-Speech within a ROS Node132
 9.5.2 Testing the talkback.py script134
 10. Robot Vision135
 10.1 OpenCV, OpenNI and PCL135
 10.2 A Note about Camera Resolutions136
 10.3 Installing and Testing the ROS Camera Drivers136
 10.3.1 Installing the OpenNI Drivers136
 10.3.2 Installing Webcam Drivers136
 10.3.3 Testing your Kinect or Xtion Camera137
 10.3.4 Testing your USB Webcam138
 10.4 Installing OpenCV on Ubuntu Linux139
 10.5 ROS to OpenCV: The cv_bridge Package139
 10.6 The ros2opencv2.py Utility145
 10.7 Processing Recorded Video147
 10.8 OpenCV: The Open Source Computer Vision Library148
 10.8.1 Face Detection148
 10.8.2 Keypoint Detection using GoodFeaturesToTrack154
 10.8.3 Tracking Keypoints using Optical Flow160
 10.8.4 Building a Better Face Tracker166
 10.8.5 Dynamically Adding and Dropping Keypoints169
 10.8.6 Color Blob Tracking (CamShift)170
 10.9 OpenNI and Skeleton Tracking177
 10.9.1 Viewing Skeletons in RViz178
 10.9.2 Accessing Skeleton Frames in your Programs178
 10.10 PCL Nodelets and 3D Point Clouds183
 10.10.1 The PassThrough Filter184
 10.10.2 Combining More than One PassThrough Filter186
 10.10.3 The VoxelGrid Filter186
 11. Combining Vision and Base Control189
 11.1 A Note about Camera Coordinate Axes189
 11.2 Object Tracker189
 11.2.1 Testing the Object Tracker with rxplot189
 11.2.2 Testing the Object Tracker with a Simulated Robot190
 11.2.3 Understanding the Object Tracker Code190
 11.2.4 Object Tracking on a Real Robot196
 11.3 Person Follower197
 11.3.1 Testing the Follower Application in Simulation197
 11.3.2 Understanding the Follower Script198
 11.3.3 Running the Follower Application on a TurtleBot202
 11.3.4 Running the Follower Node on a Filtered Point Cloud203
 12. Dynamixel Servos and ROS205
 12.1 A TurtleBot with a Pan-and-Tilt Head206
 12.2 Choosing a Dynamixel Hardware Controller206
 12.3 A Note Regarding Dynamixel Hardware207
 12.4 Choosing a ROS Dynamixel Package207
 12.5 Understanding the ROS JointState Message Type207
 12.6 Controlling Joint Position, Speed and Torque208
 12.6.1 Setting Servo Position209
 12.6.2 Setting Servo Speed210
 12.6.3 Controlling Servo Torque210
 12.7 Checking the USB2Dynamixel Connection211
 12.8 Setting the Servo Hardware IDs212
 12.9 Configuring and Launching dynamixel_controllers213
 12.9.1 The dynamixel_controllers Configuration File213
 12.9.2 The dynamixel_controllers Launch File214
 12.10 Testing the Servos216
 12.10.1 Starting the Controllers216
 12.10.2 Monitoring the Robot in RViz217
 12.10.3 Listing the Controller Topics and Monitoring Joint States217
 12.10.4 Listing the Controller Services219
 12.10.5 Setting Servo Position, Speed and Torque219
 12.10.6 Using the relax_all_servos.py Script221
 12.11 Tracking a Visual Target221
 12.11.1 Tracking a Face221
 12.11.2 The Head Tracker Script222
 12.11.3 Tracking Colored Objects227
 12.11.4 Tracking Manually Selected Targets228
 12.12 A Complete Head Tracking ROS Application229
 13. Where to Go Next?231
 
 
 
 | 
 |