Learning ROS for Robotics Programming

Book Description

Why make life difficult for yourself in robotics programming? ROS is a software framework that already supports many functionalities, and this book will tell you everything you need to know to realize its full potential.

  • Model your robot on a virtual world and learn how to simulate it
  • Carry out state-of-the-art Computer Vision tasks
  • Easy to follow, practical tutorials to program your own robots

In Detail

Both the amateur and the professional roboticist who has ever tried their hand at robotics programming will have faced with the cumbersome task of starting from scratch, usually reinventing the wheel. ROS comes with a great number of already working functionalities, and this book takes you from the first steps to the most elaborate designs possible within this software framework.

"Learning ROS for Robotics Programming" is full of practical examples that will help you to understand the framework from the very beginning. Build your own robot applications in a simulated environment and share your knowledge with the large community supporting ROS.

"Learning ROS for Robotics Programming" starts with the basic concepts and usage of ROS in a very straightforward and practical manner. It is a painless introduction to the fascinating world of robotics, covering sensor integration, modeling, simulation, computer vision, and navigation algorithms, among other topics.

After the first two chapters, concepts like topics, messages, and nodes will become daily bread. Make your robot see with HD cameras, or navigate avoiding obstacles with range sensors. Furthermore, thanks to the contributions of the vast ROS community, your robot will be able to navigate autonomously, and even recognize and interact with you, in a matter of minutes.

"Learning ROS for Robotics Programming" will give you all the background you need to know in order to start in the fascinating world of robotics and program your own robot. Simply, you put the limit!

Table of Contents

  1. Learning ROS for Robotics Programming
    1. Table of Contents
    2. Learning ROS for Robotics Programming
    3. Credits
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Getting Started with ROS
      1. Installing ROS Electric – using repositories
        1. Adding repositories to your sources.list file
        2. Setting up your keys
        3. Installation
        4. The environment setup
      2. Installing ROS Fuerte – using repositories
        1. Configuring your Ubuntu repositories
        2. Setting up your source.list file
        3. Setting up your keys
        4. Installation
        5. The environment setup
        6. Standalone tools
      3. How to install VirtualBox and Ubuntu
        1. Downloading VirtualBox
        2. Creating the virtual machine
      4. Summary
    9. 2. The ROS Architecture with Examples
      1. Understanding the ROS Filesystem level
        1. Packages
        2. Stacks
        3. Messages
        4. Services
      2. Understanding the ROS Computation Graph level
        1. Nodes
        2. Topics
        3. Services
        4. Messages
        5. Bags
        6. Master
        7. Parameter Server
      3. Understanding the ROS Community level
      4. Some tutorials to practice with ROS
        1. Navigating through the ROS filesystem
        2. Creating our own workspace
        3. Creating an ROS package
        4. Building an ROS package
        5. Playing with ROS nodes
        6. Learning how to interact with topics
        7. Learning how to use services
        8. Using the Parameter Server
        9. Creating nodes
        10. Building the node
        11. Creating msg and srv files
        12. Using the new srv and msg files
      5. Summary
    10. 3. Debugging and Visualization
      1. Debugging ROS nodes
        1. Using the GDB debugger with ROS nodes
        2. Attaching a node to GDB while launching ROS
        3. Enabling core dumps for ROS nodes
      2. Debugging messages
        1. Outputting a debug message
        2. Setting the debug message level
        3. Configuring the debugging level of a particular node
        4. Giving names to messages
        5. Conditional and filtered messages
        6. More messages – once, throttle, and combinations
        7. Using rosconsole and rxconsole to modify the debugging level on the fly
      3. Inspecting what is going on
        1. Listing nodes, topics, and services
        2. Inspecting the node's graph online with rxgraph
      4. When something weird happens – roswtf!
      5. Plotting scalar data
        1. Creating a time series plot with rxplot
        2. Other plotting utilities – rxtools
      6. Visualization of images
        1. Visualizing a single image
        2. FireWire cameras
        3. Working with stereo vision
      7. 3D visualization
        1. Visualizing data on a 3D world using rviz
        2. The relationship between topics and frames
        3. Visualizing frame transformations
      8. Saving and playing back data
        1. What is a bag file?
        2. Recording data in a bag file with rosbag
        3. Playing back a bag file
        4. Inspecting all the topics and messages in a bag file using rxbag
      9. rqt plugins versus rx applications
      10. Summary
    11. 4. Using Sensors and Actuators with ROS
      1. Using a joystick or gamepad
        1. How does joy_node send joystick movements?
        2. Using joystick data to move a turtle in turtlesim
      2. Using a laser rangefinder – Hokuyo URG-04lx
        1. Understanding how the laser sends data in ROS
        2. Accessing the laser data and modifying it
          1. Creating a launch file
      3. Using the Kinect sensor to view in 3D
        1. How does Kinect send data from the sensors and how to see it?
        2. Creating an example to use Kinect
      4. Using servomotors – Dynamixel
        1. How does Dynamixel send and receive commands for the movements?
        2. Creating an example to use the servomotor
      5. Using Arduino to add more sensors and actuators
        1. Creating an example to use Arduino
      6. Using the IMU – Xsens MTi
        1. How does Xsens send data in ROS?
        2. Creating an example to use Xsens
      7. Using a low-cost IMU – 10 degrees of freedom
        1. Downloading the library for the accelerometer
        2. Programming Arduino Nano and the 10DOF sensor
        3. Creating a ROS node to use data from the 10DOF sensor
      8. Summary
    12. 5. 3D Modeling and Simulation
      1. A 3D model of our robot in ROS
      2. Creating our first URDF file
        1. Explaining the file format
        2. Watching the 3D model on rviz
        3. Loading meshes to our models
        4. Making our robot model movable
        5. Physical and collision properties
      3. Xacro – a better way to write our robot models
        1. Using constants
        2. Using math
        3. Using macros
        4. Moving the robot with code
        5. 3D modeling with SketchUp
      4. Simulation in ROS
        1. Using our URDF 3D model in Gazebo
        2. Adding sensors to Gazebo
        3. Loading and using a map in Gazebo
        4. Moving the robot in Gazebo
      5. Summary
    13. 6. Computer Vision
      1. Connecting and running the camera
        1. FireWire IEEE1394 cameras
        2. USB cameras
      2. Making your own USB camera driver with OpenCV
        1. Creating the USB camera driver package
        2. Using the ImageTransport API to publish the camera frames
        3. Dealing with OpenCV and ROS images using cv_bridge
        4. Publishing images with ImageTransport
        5. Using OpenCV in ROS
        6. Visualizing the camera input images
      3. How to calibrate the camera
        1. Stereo calibration
      4. The ROS image pipeline
        1. Image pipeline for stereo cameras
      5. ROS packages useful for computer vision tasks
      6. Performing visual odometry with viso2
        1. Camera pose calibration
        2. Running the viso2 online demo
        3. Running viso2 with our low-cost stereo camera
      7. Summary
    14. 7. Navigation Stack – Robot Setups
      1. The navigation stack in ROS
      2. Creating transforms
        1. Creating a broadcaster
        2. Creating a listener
        3. Watching the transformation tree
      3. Publishing sensor information
        1. Creating the laser node
      4. Publishing odometry information
        1. How Gazebo creates the odometry
        2. Creating our own odometry
      5. Creating a base controller
        1. Using Gazebo to create the odometry
        2. Creating our base controller
      6. Creating a map with ROS
        1. Saving the map using map_server
        2. Loading the map using map_server
      7. Summary
    15. 8. Navigation Stack – Beyond Setups
      1. Creating a package
      2. Creating a robot configuration
      3. Configuring the costmaps (global_costmap) and (local_costmap)
        1. Configuring the common parameters
        2. Configuring the global costmap
        3. Configuring the local costmap
      4. Base local planner configuration
      5. Creating a launch file for the navigation stack
      6. Setting up rviz for the navigation stack
        1. 2D pose estimate
        2. 2D nav goal
        3. Static map
        4. Particle cloud
        5. Robot footprint
        6. Obstacles
        7. Inflated obstacles
        8. Global plan
        9. Local plan
        10. Planner plan
        11. Current goal
      7. Adaptive Monte Carlo Localization (AMCL)
      8. Avoiding obstacles
      9. Sending goals
      10. Summary
    16. 9. Combining Everything – Learn by Doing
      1. REEM – the humanoid of PAL Robotics
        1. Installing REEM from the official repository
        2. Running REEM using the Gazebo simulator
      2. PR2 – the Willow Garage robot
        1. Installing the PR2 simulator
        2. Running PR2 in simulation
        3. Localization and mapping
        4. Running the demos of the PR2 simulator
      3. Robonaut 2 – the dexterous humanoid of NASA
        1. Installing the Robonaut 2 from the sources
        2. Running Robonaut 2 in the ISS fixed pedestal
          1. Controlling the Robonaut 2 arms
          2. Controlling the robot easily with interactive markers
          3. Giving legs to Robonaut 2
          4. Loading the ISS environment
      4. Husky – the rover of Clearpath Robotics
        1. Installing the Husky simulator
        2. Running Husky on simulation
      5. TurtleBot – the low-cost mobile robot
        1. Installing the TurtleBot simulation
        2. Running TurtleBot on simulation
      6. Summary
    17. Index

Product Information

  • Title: Learning ROS for Robotics Programming
  • Author(s):
  • Release date: September 2013
  • Publisher(s): Packt Publishing
  • ISBN: 9781782161448