Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ROS Programming: Building Powerful Robots

You're reading from   ROS Programming: Building Powerful Robots Design, build and simulate complex robots using the Robot Operating System

Arrow left icon
Product type Course
Published in Mar 2018
Publisher Packt
ISBN-13 9781788627436
Length
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (5):
Arrow left icon
Anil Mahtani Anil Mahtani
Author Profile Icon Anil Mahtani
Anil Mahtani
Aaron Martinez Aaron Martinez
Author Profile Icon Aaron Martinez
Aaron Martinez
Lentin Joseph Lentin Joseph
Author Profile Icon Lentin Joseph
Lentin Joseph
Enrique Fernandez Perdomo Enrique Fernandez Perdomo
Author Profile Icon Enrique Fernandez Perdomo
Enrique Fernandez Perdomo
Luis S√°nchez Luis S√°nchez
Author Profile Icon Luis S√°nchez
Luis S√°nchez
+1 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (37) Chapters Close

Title page
Copyright and Credits
Packt Upsell
Preface
1. Getting Started with ROS FREE CHAPTER 2. ROS Architecture and Concepts 3. Visualization and Debugging Tools 4. The Navigation Stack - Robot Setups 5. The Navigation Stack - Beyond Setups 6. Manipulation with MoveIt! 7. Using Sensors and Actuators with ROS 8. Computer Vision 9. Point Clouds 10. Working with 3D Robot Modeling in ROS 11. Simulating Robots Using ROS and Gazebo 12. Working with Pluginlib, Nodelets, and Gazebo Plugins 13. Writing ROS Controllers and Visualization Plugins 14. Interfacing I/O Boards, Sensors, and Actuators to ROS 15. Programming Vision Sensors using ROS, Open-CV, and PCL 16. Building and Interfacing Differential Drive Mobile Robot Hardware in ROS 17. Exploring the Advanced Capabilities of ROS-MoveIt! 18. ROS for Industrial Robots 19. Troubleshooting and Best Practices in ROS 20. Face Detection and Tracking Using ROS, OpenCV and Dynamixel Servos 21. Building a Siri-Like Chatbot in ROS 22. Controlling Embedded Boards Using ROS 23. Teleoperate a Robot Using Hand Gestures 24. Object Detection and Recognition 25. Deep Learning Using ROS and TensorFlow 26. ROS on MATLAB and Android 27. Building an Autonomous Mobile Robot 28. Creating a Self-Driving Car Using ROS 29. Teleoperating a Robot Using a VR Headset and Leap Motion 30. Controlling Your Robots over the Web 1. Bibliography
2. Other Books You May Enjoy Index

Chapter 1. Getting Started with ROS

Welcome to the first chapter of this section, where you will learn how to install ROS, the new standard software framework in robotics. This section is an update on Learning ROS for Robotics Programming - Second Edition, based in ROS Hydro/Indigo. With ROS, you will learn how to program and control your robots the easy way, using tons of examples and source code that will show you how to use sensors and devices, or how to add new functionalities, such as autonomous navigation, visual perception, and others, to your robot. Thanks to the open source ethos and a community that is developing state-of-the-art algorithms and providing new functionalities, ROS is growing every day.

This section will cover the following topics:

  • Installing ROS Kinetic framework on a compatible version of Ubuntu
  • The basic operation of ROS
  • Debugging and visualizing data
  • Programming your robot using this framework
  • Connecting sensors, actuators, and devices to create your robot
  • Using the navigation stack to make your robot autonomous

In this chapter, we are going to install a full version of ROS Kinetic in Ubuntu. ROS is fully supported and recommended for Ubuntu, and it is experimental for other operative systems. The version used in this section is the 15.10 (Wily Werewolf), and you can download it for free from http://releases.ubuntu.com/15.10. Note that you can also use Ubuntu 16.04 (Xenial), following the same steps shown here; indeed, for the BeagleBone Black installation we will use Ubuntu Xenial.

Before starting with the installation, we are going to learn about the origin of ROS and its history.

The Robot Operating System (ROS) is a framework that, nowadays, is widely accepted and used in the robotics community. Its main goal is to make the multiple components of a robotics system easy to develop and share so they can work on other robots with minimal changes. This basically allows for code reuse, and improves the quality of the code by having it tested by a large number of users and platforms. ROS was originally developed in 2007 by the Stanford Artificial Intelligence Laboratory (SAIL) in support of the Stanford AI Robot project. Since 2008, Willow Garage continued the development, and recently Open Source Robotics Foundation (OSRF) began to oversee the maintenance of ROS and partner projects, like Gazebo, including the development of new features.

A lot of research institutions have started to develop in ROS, adding hardware and sharing their code. Also, companies have started to adapt their products to be used in ROS. In the following set of images, you can see some of the platforms that are fully supported. Normally, these platforms are published with a lot of code, examples, and simulators to permit the developers to start work easily. The first three humanoid robots are examples of robots with published code. The last one is an AUV developed by the University of Las Palmas de Gran Canaria, and the code has not been published yet. You can find many other examples at http://wiki.ros.org/Robots.

Most of the sensors and actuators used in robotics are supported by ROS as drivers.

Furthermore, some companies benefit from ROS and open hardware to create cheaper and easier to use sensors, as existing software can be used for them at zero cost. The Arduino board is a good example because you can add many different kinds of sensors to this cheap electronic board, such as encoders, light and temperature sensors, and many others, and then expose their measurements to ROS to develop robotic applications.

ROS provides a hardware abstraction, low-level device control with ROS control, implementations of commonly used functionalities and libraries, message passing between processes, and package management with catkin and cmake.

It uses graph architecture with a centralized topology, where processing takes place in nodes that may receive and send messages to communicate with other nodes on the graph net. A node is any process that can read data from a sensor, control an actuator, or run high level, complex robotic or vision algorithms for mapping or navigating autonomously in the environment.

The *-ros-pkg is a community repository for developing high-level libraries easily. Many of the capabilities frequently associated with ROS, such as the navigation library and the rviz visualizer, are developed in this repository. These libraries provide a powerful set of tools for working with ROS easily; visualization, simulators, and debugging tools are among the most important features that they have to offer. In the following image you can see two of these tools, the rviz and rqt_plot. The screenshot in the center is rqt_plot, where you can see the plotted data from some sensors. The other two screenshots are rviz; in the screenshot you can see a 3D representation of a real robot.

ROS is released under the terms of the Berkeley Software Distribution (BSD) license and is an open source software. It is free for commercial and research use. Theros-pkg contributed packages are licensed under a variety of open source licenses.

With ROS, you can take a code from the repositories, improve it, and share it again. This philosophy is the underlying principle of open source software.

ROS has numerous versions, the last one being Indigo. In this section, we are going to use Kinetic because it is the latest version. Now we are going to show you how to install ROS Kinetic. As we mentioned before, the operating system used in the section is Ubuntu, and we are going to use it throughout this section and with all the tutorials. If you use another operating system and you want to follow the section, the best option is to install a virtual machine with a copy of Ubuntu. At the end of this chapter, we will explain how to install a virtual machine to use the ROS inside it, or download a virtual machine with ROS installed.

If you want to try installing it on an operating system other than Ubuntu, you can find instructions on how to do so with many other operating systems at http://wiki.ros.org/kinetic/Installation.

You have been reading a chapter from
ROS Programming: Building Powerful Robots
Published in: Mar 2018
Publisher: Packt
ISBN-13: 9781788627436
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime