Learning ROS for Robotics Programming


Learning ROS for Robotics Programming
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • 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

Book Details

Language : English
Paperback : 332 pages [ 235mm x 191mm ]
Release Date : September 2013
ISBN : 1782161449
ISBN 13 : 9781782161448
Author(s) : Aaron Martinez, Enrique Fernández
Topics and Technologies : All Books, Open Source

Table of Contents

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

                    Aaron Martinez

                    Aaron Martinez is a computer engineer, entrepreneur, and expert in digital fabrication. He did his Master's thesis in 2010 at the IUCTC (Instituto Universitario de Ciencias y Tecnologias Ciberneticas) in the University of Las Palmas de Gran Canaria. He prepared his Master's thesis in the field of telepresence using immersive devices and robotic platforms. After completing his academic career, he attended an internship program at The Institute for Robotics in the Johannes Kepler University in Linz, Austria. During his internship program, he worked as part of a development team of a mobile platform using ROS and the navigation stack. After that, he was involved in some projects related to robotics, one of them is the AVORA project in the University of Las Palmas de Gran Canaria. In this project, he worked on the creation of an AUV (Autonomous Underwater Vehicle) to participate in the Student Autonomous Underwater Challenge-Europe (SAUC-E) in Italy. In 2012, he was responsible for manufacturing this project; in 2013, he helped to adapt the navigation stack and other algorithms from ROS to the robotic platform. Recently, Aaron created his own company called Biomecan. This company works with projects related to robotics, manufacturing of prototypes, and engineering tissue. The company manufactures devices for other companies and research and development institutes. For the past two years, he has been working on engineering tissue projects, creating a new device to help researchers of cell culture. Aaron has experience in many fields such as programming, robotics, mechatronics, and digital fabrication, many devices such as Arduino, BeagleBone, Servers, and LIDAR, servomotors, and robotic platforms such as Wifibot, Nao Aldebaran, and Pioneer P3AT.

                    Enrique Fernández

                    Enrique Fernández is a computer engineer and roboticist. He did his Master's Thesis in 2009 at the University Institute of Intelligent Systems and Computational Engineering in the University of Las Palmas de Gran Canaria. There he has been working on his Ph.D for the last four years; he is expected to become a Doctor in Computer Science by September 2013. His Ph.D addresses the problem of Path Planning for Autonomous Underwater Gliders, but he has also worked on other robotic projects. He participated in the Student Autonomous Underwater Challenge-Europe (SAUC-E) in 2012, and collaborated for the 2013 edition. In 2012, he was awarded a prize for the development of an underwater pan-tilt vision system. Now, Enrique is working for Pal-Robotics as a SLAM engineer. He completed his internship in 2012 at the Center of Underwater Robotics Research in the University of Girona, where he developed SLAM and INS modules for the Autonomous Underwater Vehicles of the research group using ROS. He joined Pal-Robotics in June 2013, where he is working with REEM robots using the ROS software intensively and developing new navigation algorithms for wheeled and biped humanoid robots, such as the REEM-H3 and REEM-C. During his Ph.D, Enrique has published several conference papers and publications. Two of these were sent to the International Conference of Robotics and Automation (ICRA) in 2011. He is the co-author of some chapters of this book, and his Master's Thesis was about the FastSLAM algorithm for indoor robots using a SICK laser scanner and the odometry of a Pioneer differential platform. He also has experience with electronics and embedded systems, such as PC104 and Arduino. His background covers SLAM, Computer Vision, Path Planning, Optimization, and Robotics and Artificial Intelligence in general.

                    Code Downloads

                    Download the code and support files for this book.


                    Submit Errata

                    Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                    Errata

                    - 8 submitted: last submission 20 May 2014

                    Errata type: Code  Page No: 29

                    <package>

                      <description brief="short description">

                        long description, 

                      </description>

                      <author>Aaron Martinez, Enrique Fernandez</author>

                      <license>BSD</license>

                     

                      <url>http://example.com/</url>

                      <depend package="roscpp"/>

                      <depend package="common"/>

                      <depend package="otherPackage"/>

                      <versioncontrol type="svn" url="https://urlofpackage/trunk"/>

                      <export>

                        <cpp cflags="-I${prefix}/include" lflags="-L${prefix}/lib -lros"/>

                    </package>

                     

                    should be:

                     

                    <package>

                      <description brief="short description">

                        long description, 

                      </description>

                      <author>Aaron Martinez, Enrique Fernandez</author>

                      <license>BSD</license>

                     

                      <url>http://example.com/</url>

                      <depend package="roscpp"/>

                      <depend package="common"/>

                      <depend package="otherPackage"/>

                      <versioncontrol type="svn" url="https://urlofpackage/trunk"/>

                      <export>

                        <cpp cflags="-I${prefix}/include" lflags="-L${prefix}/lib -lros"/>

                      </export>

                    </package>

                     

                    Errata type: Code  Page No: 41

                    $ echo "export ROS_PACKAGE_PATH"~/dev/rosbook:${ROS_PACKAGE_PATH}" >>  
                    ~/.bashrc
                    
                    
                    should be:
                    
                    
                    $ echo "export ROS_PACKAGE_PATH=~/dev/rosbook:${ROS_PACKAGE_PATH}" >>  
                    ~/.bashrc

                    Errata type: Code  Page No.: 50

                    $ rosservice call 3 3 0.2 "new_turtle"

                    should be:

                    $ rosservice call /spawn 3 3 0.2 "new_turtle"

                    Errata type: Technical  Page No: 47

                    $ rosnode info /turtlesim

                     

                    Node [/teleop_turtle]

                    should be:

                    $ rosnode info /turtlesim

                    Node [/turtlesim]

                    Errata type: Code  Page No: 57

                    The file must be named as chapter2_msg1.msg, not chapter2_msg1."


                    Errata type: Code  Page No: 117


                    $ openni_launch openni.launch

                    should be:

                    $ roslaunch openni_launch openni.launch

                    Errata type: Code  Page No: 120


                    The code line:

                    intmain (int argc, char** argv)

                    Should be:

                    int main (int argc, char** argv)

                    Errata type: Code  Page No: 130

                    The code line:
                    $ sudo apt-get install ros-fuerte-gps_umd

                    should be:


                    $ sudo apt-get install ros-fuerte-gps-umd

                    Sample chapters

                    You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                    Frequently bought together

                    Learning ROS for Robotics Programming +    Microsoft Exchange Server 2013 High Availability =
                    50% Off
                    the second eBook
                    Price for both: €33.25

                    Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                    What you will learn from this book

                    • Install a complete ROS Fuerte system
                    • Create ROS packages and stacks, using and debugging them in real time
                    • Create, handle, and debug ROS nodes
                    • Design your 3D robot model and simulate it in a virtual environment within Gazebo
                    • Use cameras to give vision to your robots, and calibrate and perform Computer Vision tasks with them
                    • Use and integrate different sensors like Range Laser, Arduino, and Kinect with your robot
                    • Create and adapt the navigation stack to work with your robot
                    • Share your knowledge with the ROS community

                    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!

                    Approach

                    The book will take an easy-to-follow and engaging tutorial approach, providing a practical and comprehensive way to learn ROS.

                    Who this book is for

                    If you are a robotic enthusiast who wants to learn how to build and program your own robots in an easy-to-develop, maintainable and shareable way, "Learning ROS for Robotics Programming" is for you. In order to make the most of the book, you should have some C++ programming background, knowledge of GNU/Linux systems, and computer science in general. No previous background on ROS is required, since this book provides all the skills required. It is also advisable to have some background on version control systems, like svn or git, which are often used to share the code by the community.

                    Code Download and Errata
                    Packt Anytime, Anywhere
                    Register Books
                    Print Upgrades
                    eBook Downloads
                    Video Support
                    Contact Us
                    Awards Voting Nominations Previous Winners
                    Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                    Resources
                    Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software