|  | 
 
| Learning ROS for Robotics Programming - Second Edition
 
 Table of Contents
 Preface ix
 Chapter 1: Getting Started with ROS Hydro 1
 PC installation 4
 Installing ROS Hydro – using repositories 4
 Configuring your Ubuntu repositories 5
 Setting up your source.list file 6
 Setting up your keys 7
 Installing ROS 7
 Initializing rosdep 8
 Setting up the environment 9
 Getting rosinstall 10
 How to install VirtualBox and Ubuntu 11
 Downloading VirtualBox 11
 Creating the virtual machine 12
 Installing ROS Hydro in BeagleBone Black (BBB) 15
 Prerequisites 16
 Setting up the local machine and source.list file 18
 Setting up your keys 19
 Installing the ROS packages 19
 Initializing rosdep for ROS 20
 Setting up the environment in BeagleBone Black 20
 Getting rosinstall for BeagleBone Black 21
 Summary 21
 Chapter 2: ROS Architecture and Concepts 23
 Understanding the ROS Filesystem level 24
 The workspace 25
 Packages 27
 Metapackages 29
 Table of Contents
 [ ii ]
 Messages 31
 Services 32
 Understanding the ROS Computation Graph level 33
 Nodes and nodelets 35
 Topics 36
 Services 37
 Messages 38
 Bags 38
 The ROS master 39
 Parameter Server 39
 Understanding the ROS Community level 40
 Tutorials to practice with ROS 41
 Navigating by ROS Filesystem 41
 Creating our own workspace 42
 Creating a ROS package and metapackage 43
 Building an ROS package 44
 Playing with ROS nodes 45
 Learning how to interact with topics 48
 Learning how to use services 52
 Using Parameter Server 55
 Creating nodes 56
 Building the node 59
 Creating msg and srv files 61
 Using the new srv and msg files 64
 The launch file 68
 Dynamic parameters 71
 Summary 77
 Chapter 3: Visualization and Debug Tools 79
 Debugging ROS nodes 83
 Using the GDB debugger with ROS nodes 83
 Attaching a node to GDB while launching ROS 85
 Profiling a node with valgrind while launching ROS 85
 Enabling core dumps for ROS nodes 86
 Logging messages 86
 Outputting a logging message 86
 Setting the debug message level 87
 Configuring the debugging level of a particular node 88
 Giving names to messages 90
 Conditional and filtered messages 90
 Table of Contents
 [ iii ]
 Showing messages in the once, throttle, and other combinations 91
 Using rqt_console and rqt_logger_level to modify the debugging
 level on the fly 92
 Inspecting what is going on 96
 Listing nodes, topics, services, and parameters 96
 Inspecting the node's graph online with rqt_graph 100
 Setting dynamic parameters 103
 When something weird happens 105
 Visualizing node diagnostics 106
 Plotting scalar data 108
 Creating a time series plot with rqt_plot 108
 Image visualization 111
 Visualizing a single image 112
 3D visualization 113
 Visualizing data in a 3D world using rqt_rviz 114
 The relationship between topics and frames 117
 Visualizing frame transformations 118
 Saving and playing back data 120
 What is a bag file? 120
 Recording data in a bag file with rosbag 121
 Playing back a bag file 122
 Inspecting all the topics and messages in a bag file 123
 Using the rqt_gui and rqt plugins 126
 Summary 127
 Chapter 4: Using Sensors and Actuators with ROS 129
 Using a joystick or a gamepad 130
 How does joy_node send joystick movements? 131
 Using joystick data to move a turtle in turtlesim 132
 Using a laser rangefinder – Hokuyo URG-04lx 136
 Understanding how the laser sends data in ROS 138
 Accessing the laser data and modifying it 140
 Creating a launch file 142
 Using the Kinect sensor to view objects in 3D 143
 How does Kinect send data from the sensors, and how do we see it? 144
 Creating an example to use Kinect 146
 Using servomotors – Dynamixel 149
 How does Dynamixel send and receive commands for the movements? 150
 Creating an example to use the servomotor 151
 Using Arduino to add more sensors and actuators 153
 Creating an example program to use Arduino 154
 Table of Contents
 [ iv ]
 Using an ultrasound range sensor with Arduino 157
 How distance sensors send messages 160
 Creating an example to use the ultrasound range 161
 Using the IMU – Xsens MTi 163
 How does Xsens send data in ROS? 164
 Creating an example to use Xsens 165
 Using a low-cost IMU – 10 degrees of freedom 167
 Downloading the library for the accelerometer 169
 Programming Arduino Nano and the 10 DOF sensor 169
 Creating an ROS node to use data from the 10 DOF sensor 172
 Using a GPS system 174
 How GPS sends messages 176
 Creating an example project to use GPS 177
 Summary 179
 Chapter 5: Computer Vision 181
 Connecting and running the camera 182
 FireWire IEEE1394 cameras 182
 USB cameras 187
 Writing your own USB camera driver with OpenCV 189
 Using OpenCV and ROS images with cv_bridge 195
 Publishing images with image transport 195
 Using OpenCV in ROS 196
 Visualizing the camera input images 197
 Calibrating the camera 197
 Stereo calibration 202
 The ROS image pipeline 207
 The image pipeline for stereo cameras 210
 ROS packages useful for Computer Vision tasks 214
 Using visual odometry with viso2 216
 Camera pose calibration 216
 Running the viso2 online demo 220
 Running viso2 with our low-cost stereo camera 223
 Performing visual odometry with an RGBD camera 224
 Installing fovis 225
 Using fovis with the Kinect RGBD camera 225
 Computing the homography of two images 228
 Summary 229
 Chapter 6: Point Clouds 231
 Understanding the point cloud library 232
 Different point cloud types 233
 Table of Contents
 [ v ]
 Algorithms in PCL 234
 The PCL interface for ROS 234
 My first PCL program 236
 Creating point clouds 237
 Loading and saving point clouds to the disk 241
 Visualizing point clouds 245
 Filtering and downsampling 249
 Registration and matching 255
 Partitioning point clouds 259
 Segmentation 264
 Summary 269
 Chapter 7: 3D Modeling and Simulation 271
 A 3D model of our robot in ROS 271
 Creating our first URDF file 271
 Explaining the file format 274
 Watching the 3D model on rviz 275
 Loading meshes to our models 277
 Making our robot model movable 278
 Physical and collision properties 279
 Xacro – a better way to write our robot models 280
 Using constants 281
 Using math 281
 Using macros 281
 Moving the robot with code 282
 3D modeling with SketchUp 286
 Simulation in ROS 288
 Using our URDF 3D model in Gazebo 289
 Adding sensors to Gazebo 293
 Loading and using a map in Gazebo 296
 Moving the robot in Gazebo 298
 Summary 301
 Chapter 8: The Navigation Stack – Robot Setups 303
 The navigation stack in ROS 304
 Creating transforms 305
 Creating a broadcaster 306
 Creating a listener 307
 Watching the transformation tree 310
 Publishing sensor information 310
 Creating the laser node 312
 Table of Contents
 [ vi ]
 Publishing odometry information 314
 How Gazebo creates the odometry 316
 Creating our own odometry 319
 Creating a base controller 324
 Using Gazebo to create the odometry 326
 Creating our base controller 327
 Creating a map with ROS 330
 Saving the map using map_server 332
 Loading the map using map_server 333
 Summary 334
 Chapter 9: The Navigation Stack – Beyond Setups 335
 Creating a package 336
 Creating a robot configuration 336
 Configuring the costmaps – global_costmap and local_costmap 339
 Configuring the common parameters 340
 Configuring the global costmap 341
 Configuring the local costmap 341
 Base local planner configuration 342
 Creating a launch file for the navigation stack 343
 Setting up rviz for the navigation stack 345
 The 2D pose estimate 345
 The 2D nav goal 347
 The static map 348
 The particle cloud 349
 The robot's footprint 350
 The local costmap 351
 The global costmap 352
 The global plan 353
 The local plan 354
 The planner plan 355
 The current goal 356
 Adaptive Monte Carlo Localization 357
 Modifying parameters with rqt_reconfigure 359
 Avoiding obstacles 360
 Sending goals 362
 Summary 365
 Chapter 10: Manipulation with MoveIt! 367
 The MoveIt! architecture 368
 Motion planning 370
 The planning scene 371
 Table of Contents
 [ vii ]
 Kinematics 372
 Collision checking 372
 Integrating an arm in MoveIt! 372
 What's in the box? 373
 Generating a MoveIt! package with the setup assistant 374
 Integration into RViz 382
 Integration into Gazebo or a real robotic arm 386
 Simple motion planning 387
 Planning a single goal 388
 Planning a random target 389
 Planning a predefined group state 390
 Displaying the target motion 391
 Motion planning with collisions 391
 Adding objects to the planning scene 392
 Removing objects from the planning scene 394
 Motion planning with point clouds 394
 The pick and place task 396
 The planning scene 397
 The target object to grasp 398
 The support surface 399
 Perception 401
 Grasping 402
 The pickup action 405
 The place action 408
 The demo mode 411
 Simulation in Gazebo 412
 Summary 413
 Index 415
 
 
 
  Learning ROS for Robotics Programming - Second Edition.pdf
(9.93 MB, 下载次数: 1900) 
 | 
 |