O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Robot Operating System Cookbook

Book Description

Leverage the power of ROS to build exciting collaborative robots.

About This Book
  • Delve into an open source, meta-operating system for your robot
  • Get acquainted with tools and libraries for building and running code on multiple platforms
  • Use Gazebo to model your robot and create a virtual environment
Who This Book Is For

If you're a researcher or engineer with an interest in the problems, solutions, and future research issues that you may encounter in the development of robotic applications, this book is for you. Basic knowledge of C++ and Python programming with the GNU/Linux environment is strongly recommended to assist with understanding the key concepts covered in the book.

What You Will Learn
  • Explore advanced concepts, such as ROS pluginlib, nodelets, and actionlib
  • Work with ROS visualization, profiling, and debugging tools
  • Gain experience in robot modeling and simulation using Gazebo
  • Understand the ROS Navigation Stack for mobile robots
  • Configure a MoveIt! package for a manipulator robot
  • Develop an autonomous navigation framework for MAV using ORB SLAM and MoveIt
  • Integrate sensors, actuators, and robots into the ROS ecosystem
  • Get acquainted with the ROS-Industrial package with hardware support, capabilities, and applications
In Detail

This book will leverage the power of ROS with an introduction to its core and advanced concepts through exciting recipes. You will get acquainted with the use of different synchronous and asynchronous communication methods, including messages, services, and actions. You will learn how to use the various debugging and visualization tools used in development and how to interface sensors and actuators with the ROS framework.

Firstly, you will get to grips with ROS simulation frameworks, such as Gazebo and RotorS for modeling and simulating any physical robot and virtual environment. You will also cover mobile robotics, micro-aerial vehicles, and robotic arms, which are the leading branches of robotic applications. Robot Operating System Cookbook will also guide you in the development of an autonomous navigation framework for both mobile robots and micro-aerial vehicles.

Finally, you will explore ROS-Industrial, an open source project that extends the advanced capabilities of ROS software to manufacturing industries.

Style and approach

The goal of this book is to provide an integrated overview of the concepts and techniques. ROS is not an operating system in the traditional sense of process management and scheduling; rather, it provides a structured communications layer above the host operating systems of a heterogeneous compute cluster.

Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Robot Operating System Cookbook
  3. www.PacktPub.com
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
  6. Getting Started with ROS
    1. Introduction
    2. Installing ROS on desktop systems
      1. ROS distribution
      2. Supported operating systems
      3. How to do it…
        1. Configuring Ubuntu repositories
        2. Setting up the source.list file
        3. Setting up keys
        4. ROS Kinetic Installation
        5. ROS Melodic installation
        6. Initializing rosdep
          1. Setting up the environment
        7. Getting rosinstall
        8. Build Farm Status
    3. Installing ROS on a virtual machine
      1. How to do it…
    4. Using ROS from a Linux container
      1. Getting ready
      2. How to do it…
        1. Installing Docker
        2. Adding the Docker repository to APT sources
        3. Getting and using ROS Docker images
      3. See also
    5. Installing ROS on an ARM-based board
      1. Getting ready
      2. How to do it…
      3. Setting system locale
      4. Setting up sources.list
      5. Setting up keys
    6. Installing the ROS packages
      1. Adding individual packages
      2. Initializing rosdep
      3. Environment setup
      4. Getting rosinstall
  7. ROS Architecture and Concepts I
    1. Introduction
    2. Exploring the ROS filesystem
      1. Getting ready
      2. How to do it…
      3. There's more…
    3. Analyzing the ROS computation graph
      1. Getting ready
      2. How it works...
    4. Associating with the ROS community
      1. Getting ready
    5. Learning working with ROS
      1. Getting ready
      2. How to do it…
      3. How it works…
        1. Creating ROS nodes
        2. Building the ROS node
        3. Creating ROS messages
        4. Creating ROS services
      4. See also
        1. Understanding the ROS launch file
  8. ROS Architecture and Concepts – II
    1. Introduction
    2. Understanding the parameter server and dynamic parameters
      1. Getting ready
      2. How to do it…
    3. Understanding the ROS actionlib
      1. Getting ready
      2. How to do it…
    4. Understanding the ROS pluginlib
      1. Getting ready
      2. How to do it…
        1. Creating plugins
        2. Compiling the plugin library
        3. Plugins registration
        4. Making the plugins available to the ROS toolchain
          1. The Plugin XML File
          2. Exporting plugins
          3. Using a plugin
        5. Running the code
    5. Understanding the ROS nodelets
      1. Getting ready
      2. How to do it…
        1. Creating a nodelet
        2. Plugin description
        3. Building and running nodelets
      3. There's more…
    6. Understanding the Gazebo Framework and plugin
      1. Getting ready
      2. How to do it…
        1. Hello World plugin
        2. Compiling the plugin
        3. Using a plugin
    7. Understanding the ROS transform frame (TF)
      1. Getting ready
        1. Using view_frames
        2. Using rqt_tf_tree
        3. Using tf_echo
        4. Using RViz and TF
      2. How to do it…
        1. Writing a TF broadcaster
        2. Writing a tf listener
        3. Compiling and running the TF
    8. Understanding the ROS Visualization tool (RViz) and its plugins
      1. Getting ready
        1. Display panel
        2. RViz toolbar
        3. View panel
        4. Time panel
        5. Developing an RViz plugin for IMU Display
      2. How to do it…
        1. Exporting the plugin
        2. Building and working with the plugin
  9. ROS Visualization and Debugging Tools
    1. Introduction
    2. Debugging and profiling ROS nodes
      1. Getting ready
      2. How to do it…
    3. Logging and visualizing ROS messages
      1. Getting ready
      2. How it works…
      3. There's more…
    4. Inspecting and diagnosing the ROS system
      1. Getting ready
      2. How to do it…
    5. Visualizing and plotting scalar data
      1. Getting ready
      2. How to do it…
      3. There's more…
    6. Visualizing non-scalar data – 2D/3D images
      1. Getting ready
      2. How it works…
    7. Recording and playing back ROS topics
      1. Getting ready
      2. How it works…
      3. There's more…
  10. Accessing Sensors and Actuators through ROS
    1. Introduction
    2. Understanding the Arduino-ROS interface
      1. Getting ready
      2. How to do it…
      3. How it works…
    3. Interfacing 9DoF Razor IMU-Arduino-ROS
      1. Getting ready
      2. How to do it…
      3. How it works…
    4. Using a GPS system – Ublox
      1. Getting ready
      2. How to do it…
      3. How it works…
    5. Interfacing servomotors – Dynamixel
      1. How to do it…
      2. How it works…
    6. Using a Laser Rangefinder – Hokuyo
      1. Getting ready
      2. How to do it…
      3. How it works…
    7. Working with the Kinect sensor to view objects in 3D
      1. Getting ready
      2. How to do it…
      3. How it works…
    8. Using a joystick or a gamepad in ROS
      1. How to do it…
      2. How it works…
  11. ROS Modeling and Simulation
    1. Introduction
    2. Understanding robot modeling using URDF
      1. Getting ready
      2. How it works…
    3. Understanding robot modeling using xacro
      1. Getting ready
      2. How it works…
    4. Understanding the joint state publisher and the robot state publisher
      1. Getting ready
      2. How it works…
      3. There's more…
    5. Understanding the Gazebo architecture and interface with ROS
      1. Getting ready
      2. How to do it…
        1. Integrating sensors
        2. Using map
        3. Controlling the robot
  12. Mobile Robot in ROS
    1. Introduction
    2. The navigation stack in ROS
      1. Getting ready
      2. How it works…
        1. Transform Frames
        2. Sensors
        3. Odometry
        4. Base controller
        5. Map
    3. Interfacing the mobile robot to the navigation stack
      1. Getting ready
      2. How to do it…
      3. How it works…
        1. Common parameters
        2. Global costmap
        3. Local costmap
        4. Configuring the planner
    4. Creating a launch file for the navigation stack
      1. Getting ready
      2. How it works…
    5. Setting up RViz for the navigation stack – visualization
      1. Getting ready
      2. How it works…
        1. 2D pose estimate
        2. 2D nav goal
        3. Static map
        4. Particle cloud
        5. Robot's footprint
        6. Local costmap
        7. Global costmap
        8. Global plan
        9. Local plan
        10. Planner plan
        11. Current goal
      3. There's more…
    6. Robot localization – Adaptive Monte Carlo Localization (AMCL)
      1. Getting ready
      2. How it works…
    7. Configuring navigation stack parameters with rqt_reconfigure
      1. How it works…
    8. Autonomous navigation of mobile robots – avoiding obstacles
      1. Getting ready
      2. How it works…
    9. Sending goals
      1. Getting ready
      2. How it works…
  13. The Robotic Arm in ROS
    1. Introduction
      1. Dangerous workspaces
      2. Repetitive or unpleasant work
      3. Human-intractable workspaces
    2. Basic concepts of MoveIt!
      1. MoveIt
      2. Motion planning
      3. Perception
      4. Grasping
      5. Getting ready
        1. DoFs for manipulation
        2. Grippers
    3. Motion planning using graphical interfaces
      1. Getting ready
        1. MoveIt architecture
      2. How it works…
        1. Basic motion planning
      3. How it works…
        1. MoveIt! planning scene
        2. MoveIt! kinematics handling
        3. MoveIt! collision checking
      4. There's more…
        1. Moving the real robot
    4. Performing motion planning using control programs
      1. Getting ready
      2. How to do it…
        1. Planning a trajectory
        2. Planning to a joint space goal
        3. Getting useful information from motion planning
      3. Executing a trajectory
    5. Adding perception to motion planning
      1. Getting ready
      2. How to do it…
        1. Adding perception to MoveIt
      3. How it works…
      4. There's more…
      5. See also…
    6. Grasping action with the robotic arm or manipulator
      1. Getting ready
        1. Creating a pick and place task
      2. How to do it…
      3. How it works…
      4. See also
  14. Micro Aerial Vehicles in ROS
    1. Introduction
    2. Overview of MAV system design
      1. Getting ready
    3. A generic mathematical model of an MAV/drone
      1. Getting ready
        1. Forces and moments on quadcopter
        2. Hover and upward and downward motion
        3. Rotation (yaw) motion
        4. Linear (pitch and roll) motion
    4. Simulation of an MAV/drone using RotorS/Gazebo
      1. Getting ready
        1. Simulator overview
      2. How to do it…
        1. Hovering
        2. State estimation
        3. Sensors mounting
        4. Evaluation
      3. How it works…
        1. Developing a custom controller
      4. There's more…
      5. See also
        1. Creating custom sensors
    5. Autonomous navigation framework for an MAV/Drone
      1. Getting ready
        1. Collision avoidance
        2. Path planning
      2. How to do it…
      3. How it works…
    6. Working with a real MAV/drone – Parrot, Bebop
      1. Getting ready
      2. How to do it…
        1. Executing the trajectory with the real MAV/drone
      3. How it works…
  15. ROS-Industrial (ROS-I)
    1. Introduction
    2. Understanding ROS-I packages
      1. Getting ready
    3. 3D modeling and simulation of an industrial robot and MoveIt!
      1. Getting ready
        1. URDF modeling for an industrial robot
      2. How to do it…
        1. Controlling the robot in the simulation
    4. Working with ROS-I packages – Universal Robots, ABB robot
      1. Getting ready
        1. Universal Robots
        2. ABB Robots
    5. ROS-I Robot support packages
      1. Getting ready
    6. ROS-I Robot client package
      1. Getting ready
    7. ROS-I robot driver specification
      1. Getting ready
    8. Developing a custom MoveIt! IKFast plugin
      1. Getting ready
        1. OpenRAVE installation
      2. How to do it…
    9. ROS-I-MTConnect integration
      1. Getting ready
      2. How to do it…
    10. Future of ROS-I – hardware support, capabilities, and applications
  16. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think