Preface

Being excited about learning ROS and working with ROS robots such as Baxter and TurtleBot is the beginning of a big adventure. The features and benefits of ROS are substantial, but the learning curve is steep. Through trial and error, we have foraged a path through many of the ROS applications trying everything. In this book, we hope to present to you the best of our knowledge of ROS and provide you with detailed step-by-step instructions for your journey. Our approach centers on using the ROS robots that are featured, namely TurtleBot, Baxter, Crazyflie, and Bebop, as well as simulated robots—Turtlesim and Hector.

This book provides introductory information as well as advanced applications featuring these ROS robots. The chapters begin with the basics of setting up your computer and loading ROS and the packages for ROS robots and tools. Straightforward instructions are provided with troubleshooting steps for when the desired results are not achieved. The building blocks of ROS are described first in the simulation Turtlesim, then on each of the featured robots. Starting with basic ROS commands, the ROS packages, nodes, topics, and messages are explored to gain an overall knowledge of these ROS robotic systems. Technical information on these example robots is provided to describe the robot's full capabilities.

ROS encompasses a full spectrum of software concepts, implementation, and tools that attempt to provide a homogeneous view of the complex systems and software integration required in robotics. Extensive libraries of sensor and actuator drivers and interfaces are already in place, as well as the latest and most efficient algorithms. What ROS doesn't provide directly is imported from other prevailing open source projects such as OpenCV. ROS also possesses a spectrum of time-saving tools to control, monitor, and debug robot applications: rqt, rviz, Gazebo, dynamic reconfigure, and MoveIt, to name a few.

In the pages that follow, each of these areas will be incrementally introduced to the reader as part of the robot examples. With TurtleBot, the subjects of navigation and mapping are explored. Using Baxter, joint control and path planning are described for your understanding. Simple Python scripts are included to provide examples of implementing ROS elements for many of these robots. These robots are all available in simulation to accomplish the exercises in this book. Furthermore, instructions are provided for you to build and control your own robot models in simulation.

The power of ROS, the variety of robots using ROS, and the diversity and support of the widespread ROS community make this adventure worthwhile. Extensive online tutorials, wiki instructions, forums, and tips and tricks are available for ROS. So dive into the pages of this book to begin your adventure with ROS robotics!

What this book covers

Chapter 1, Getting Started with ROS, explains to you the advantages of learning ROS and highlights the spectrum of robots currently using ROS. Instructions for installing and launching ROS on a computer running an Ubuntu operating system are provided. An overview of the ROS architecture is given and its components are described. The Turtlesim simulation is introduced, and used to provide a deeper understanding of how the components of ROS work and a familiarity with ROS commands.

Chapter 2, Creating Your First Two-Wheeled ROS Robot (in Simulation), introduces you to the ROS simulation environment of Gazebo. We will lead you through the steps to create your first robot simulation (a two-wheeled differential-drive base) and teach the structure of the Universal Robotic Description Format. The use of the ROS tool rviz and Gazebo are detailed to enable you to display your robot and interact with it.

Chapter 3, Driving Around with TurtleBot, introduces you to real ROS robots, TurtleBot2 and the recently available TurtleBot 3. These mobile base robots can be used in the simulation environment of Gazebo if you do not own one. ROS commands and Python scripts are used to control TurtleBot through a variety of methods. The ROS tool rqt is introduced, and subsets of its plugins are used to control TurtleBot and monitor its sensor data.

Chapter 4, Navigating the World with TurtleBot, explores visual sensors and the ability for a robot to map its environment. The 3D sensor options for TurtleBot's vision system are described and their setup and operation using ROS enables TurtleBot to navigate autonomously. The knowledge of the Simultaneous Localization and Mapping techniques is applied in combination with TurtleBot's navigation stack to move about in the mapped environment.

Chapter 5, Creating Your First Robot Arm (in Simulation), provides a gentle introduction into the complexity of robotic arms. A simulated robot arm is designed and built using the macro language of Xacro. Controllers for the arm are created to operate the arm in Gazebo. Through developing the controllers for this arm, an insight into the mechanics and physics of a simple robot arm is offered.

Chapter 6, Wobbling Robot Arms Using Joint Control, takes a deeper look at the intricacies of controlling robotic arms. Baxter has two 7 degree-of-freedom arms and a number of other sensors. Baxter Simulator is available as open source software to use for the instructions in this chapter. Examples are provided for control of Baxter's arms using position, velocity, and torque modes with control for both forward and inverse kinematics. The ROS tool MoveIt is introduced for motion planning in simulation and execution on either a real or simulated Baxter.

Chapter 7, Making a Robot Fly, describes a growing area of ROS robotics—unmanned air vehicles. This chapter focuses on quadrotors, and an understanding of quadrotor hardware and flight control is provided. Instructions for downloading and controlling the simulated quadrotor Hector are supplied. With skills from flying a simulated quadrotor, you can move on to control a real Bitcraze Crazyflie or Parrot Bebop. Quadrotor control is via teleoperation or ROS topic/message commands.

Chapter 8, Controlling Your Robots with External Devices, presents a number of peripheral devices you can use for controlling a ROS robot. Joystick controllers, controller boards (Arduino and Raspberry Pi), and mobile devices have ROS interfaces that can be integrated with your robot to provide external control.

Chapter 9, Flying a Mission with Crazyflie, incorporates many of the ROS components and concepts presented in this book into a challenging mission of autonomous flight. The mission involves the Crazyflie quadrotor flying to a "remote" target all mapped through a Kinect 3D sensor. This mission uses ROS message communication and co-ordinate transforms to employ the Kinect's view of the quadrotor and target to orchestrate the flight. Flight control software for Crazyflie using PID control is described and provided as part of the mission software.

Chapter 10, Controlling Baxter with MATLAB©, delves into a new realm of communicating with and controlling ROS robots through MATLAB and its Robotics System Toolbox. Baxter, the two-armed robot introduced in Chapter 6, Wobbling Robot Arms Using Joint Control, will be used to show how to set up a ROS robot in MATLAB by adding custom messages into the Robotics System Toolbox. Communication and control of Baxter and his arms will be accomplished using MATLAB scripts and ROS commands.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.126.241