Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
ROS Robotics By Example, Second Edition
ROS Robotics By Example, Second Edition

ROS Robotics By Example, Second Edition: Learning to control wheeled, limbed, and flying robots using ROS Kinetic Kame , Second Edition

Arrow left icon
Profile Icon Harman Profile Icon Carol Fairchild Profile Icon Lentin Joseph
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (6 Ratings)
Paperback Nov 2017 484 pages 2nd Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Harman Profile Icon Carol Fairchild Profile Icon Lentin Joseph
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (6 Ratings)
Paperback Nov 2017 484 pages 2nd Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

ROS Robotics By Example, Second Edition

Chapter 2. Creating Your First Two-Wheeled ROS Robot (in Simulation)

Your first robot will be created in simulation so that even if you do not have a physical robot to learn ROS on, you will be able to follow along and do the exercises in this book. We will build a simple two-wheeled robot named dd_robot (dd is short for differential drive). We will build a Unified Robot Description Format (URDF) file for the robot that will describe the main components of our robot and enable it to be visualized and controlled by ROS tools, such as rviz and Gazebo. Rviz is a visualization tool in which we will view our dd_robot URDF file as we build it in increments. When the visual model is complete, we will modify the URDF file for use in the Gazebo simulator. In Gazebo, we can view the effects of physics on our model as we move our model around the 3D environment.

In this chapter, we will cover the following topics:

  • An introduction to rviz, installation instructions, and instructions for use...

Introducing rviz

Rviz, abbreviation for ROS visualization, is a powerful 3D visualization tool for ROS. It allows the user to view the robot model, display and/or log sensor information from the robot's sensors, and replay the logged sensor information. By visualizing what the robot is seeing, thinking, and doing, the user can debug a robot application from sensor inputs to planned (or unplanned) actions.

Rviz displays 3D sensor data from stereo cameras, lasers, Kinects, and other 3D devices in the form of point clouds or depth images. 2D sensor data from webcams, RGB cameras, and 2D laser rangefinders can be viewed in rviz as image data.

If an actual robot is communicating with a workstation that is running rviz, rviz will display the robot's current configuration on the virtual robot model. For example, if a real two-armed robot like Baxter has his arms in a certain pose, then the robot model will display that pose in rviz. The ROS topic containing arm configuration information...

Creating and building a ROS package

Before we begin to design and build our robot model in simulation, we should create our first ROS package. In Chapter 1, Getting Started with ROS, we created a ROS catkin workspace under /home/<username>/catkin_ws. The structure of a catkin workspace looks like this:

catkin_ws/                     -- WORKSPACE
build/                         -- BUILD SPACE
devel/                         -- DEVEL SPACE
src/                           -- SOURCE SPACE
CMakeLists.txt          -- 'Toplevel' CMake file, provided by catkin

Tip

Make sure that you have source ~/catkin_ws/devel/setup.bash in your .bashrc file, or this command is entered at the terminal window prompt.

We begin by moving to your catkin workspace source directory:

$ cd ~/catkin_ws/src

Now, let's create our first ROS package, ros_robotics:

$ catkin_create_pkg ros_robotics

This command will create a /ros_robotics directory under the ~/catkin_ws/src directory. The /ros_robotics directory...

Building a differential drive robot URDF

URDF is an XML format specifically defined to represent robot models down to their component level. These URDF files can become long and cumbersome on complex robot systems. XML Macros (Xacro) is an XML macro language created to make these robot description files easier to read and maintain. Xacro helps you reduce the duplication of information within the file.

For our first robot model, we will build a URDF file for a two-wheeled differential drive robot. The model will be created incrementally, and we will view the results at each step in rviz. When our simple two-wheeled robot is complete, we will add Gazebo formatting and view the model in Gazebo. In Chapter 5, Creating Your First Robot Arm (in Simulation), we will expand our knowledge of URDF files and build a simple robot arm model using the Xacro notation.

Note

Downloading the ros_robotics code

You can download the example code files and other support material for this book from the Packt Publishing...

Gazebo

Gazebo is a free and open source robot simulation environment developed by Willow Garage. As a multifunctional tool for ROS robot developers, Gazebo supports the following:

  • Designing of robot models
  • Rapid prototyping and testing of algorithms
  • Regression testing using realistic scenarios
  • Simulation of indoor and outdoor environments
  • Simulation of sensor data for laser range finders, 2D/3D cameras, kinect-style sensors, contact sensors, force-torque, and more
  • Advanced 3D objects and environments utilizing Object-Oriented Graphics Rendering Engine (OGRE)
  • Several high-performance physics engines (Open Dynamics Engine (ODE), Bullet, Simbody, and Dynamic Animation and Robotics Toolkit (DART)) to model the real-world dynamics

In this section, we will load our two-wheeled robot URDF into Gazebo to visualize it in a 3D environment. Gazebo allows you to take control of some aspects of our model without an external control program. In the later chapters, we will be using simulated versions of robots...

Summary

Your first robot design has been a simple two-wheeled differential drive model defined in URDF. There are many other properties that can be defined in the URDF file, and you are free to extend the dd_robot model. This introductory exercise was provided so that the elements of simulation can be understood by the reader. In an upcoming chapter, we will extend our understanding of URDF by learning about Xacro. We will build a Xacro file to define a robot model for a robot arm.

In Chapter 3, Driving Around with TurtleBot, we will use a simulated and a real TurtleBot to explore a variety of ROS control methods for mobile robot navigation. The rqt toolset will be introduced and used to monitor and control the TurtleBot's movements.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Get to know the fundamentals of ROS and apply its concepts to real examples
  • Learn how to write robotics applications without getting bogged down in hardware problems
  • Learn to implement best practices in ROS development

Description

ROS is a robust robotics framework that works regardless of hardware architecture or hardware origin. It standardizes most layers of robotics functionality from device drivers to process control and message passing to software package management. But apart from just plain functionality, ROS is a great platform to learn about robotics itself and to simulate, as well as actually build, your first robots. This does not mean that ROS is a platform for students and other beginners; on the contrary, ROS is used all over the robotics industry to implement flying, walking and diving robots, yet implementation is always straightforward, and never dependent on the hardware itself. ROS Robotics has been the standard introduction to ROS for potential professionals and hobbyists alike since the original edition came out; the second edition adds a gradual introduction to all the goodness available with the Kinetic Kame release. By providing you with step-by-step examples including manipulator arms and flying robots, the authors introduce you to the new features. The book is intensely practical, with space given to theory only when absolutely necessary. By the end of this book, you will have hands-on experience on controlling robots with the best possible framework.

Who is this book for?

This book is for robotic enthusiasts, researchers and professional robotics engineers who would like to build robot applications using ROS. It gives the robotics beginner and the ROS newbie an immensely practical introduction to robot building and robotics application coding. Basic knowledge of GNU/Linux and the ability to write simple applications is assumed, but no robotics knowledge, practical or theoretical, is needed.

What you will learn

  • •Control a robot without requiring a PhD in robotics
  • •Simulate and control a robot arm
  • •Control a flying robot
  • •Send your robot on an independent mission
  • •Learning how to control your own robots with external devices
  • •Program applications running on your robot
  • •Extend ROS itself
  • •Extend ROS with the MATLAB Robotics System Toolbox

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 30, 2017
Length: 484 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788479592
Category :
Languages :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Nov 30, 2017
Length: 484 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788479592
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 125.97
Mastering ROS for Robotics Programming
€41.99
ROS Robotics Projects
€41.99
ROS Robotics By Example, Second Edition
€41.99
Total 125.97 Stars icon

Table of Contents

11 Chapters
1. Getting Started with ROS Chevron down icon Chevron up icon
2. Creating Your First Two-Wheeled ROS Robot (in Simulation) Chevron down icon Chevron up icon
3. Driving Around with TurtleBot Chevron down icon Chevron up icon
4. Navigating the World with TurtleBot Chevron down icon Chevron up icon
5. Creating Your First Robot Arm (in Simulation) Chevron down icon Chevron up icon
6. Wobbling Robot Arms Using Joint Control Chevron down icon Chevron up icon
7. Making a Robot Fly Chevron down icon Chevron up icon
8. Controlling Your Robots with External Devices Chevron down icon Chevron up icon
9. Flying a Mission with Crazyflie Chevron down icon Chevron up icon
10. Controlling Baxter with MATLAB© Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Most Recent
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(6 Ratings)
5 star 66.7%
4 star 0%
3 star 33.3%
2 star 0%
1 star 0%
Filter icon Filter
Most Recent

Filter reviews by




Cliente Amazon Jan 18, 2021
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Personalmente ho fatto\faccio fatica a seguirlo. Speravo di riuscire a capire meglio ma probabilmente mi mancano troppe basi con l'ambiente Linux. Chi ne sa di più probabilmente lo può trovare interessante, io al momento ho bisogno di altri libri più semplici.
Amazon Verified review Amazon
Francisco Reveriano Nov 09, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a must buy for anyone wanting to work with ROS.It easy to read through. And provides plenty of easy to read explanation.
Amazon Verified review Amazon
Laura LL Aug 29, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Die erste Chapter ist ähnlich wie in ROS Website. Das macht mir ein bißchen enttäuscht.Und diese Edition ist nur für ros kinetic.
Amazon Verified review Amazon
Nate Wiggins Feb 28, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
ROS Robotics by Example is an excellent way to get yourself immersed in the technology of the future. I was following examples for the turtlebot so that I can learn some new skills and couldn't help but notice that I could hack our drone too! ROS is the future of robotics and this book is perfect for a robotics or CS course and a must-have for the new generation of engineers.
Amazon Verified review Amazon
Luong Nguyen Feb 27, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is one of the best books to buy if you are new to ROS. It provides the many details that are not usually found in other books on ROS and which help users learn quickly. Highly recommended.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.