Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
ROS Robotics By Example
ROS Robotics By Example

ROS Robotics By Example: Bring life to your robot using ROS robotic applications

Arrow left icon
Profile Icon Carol Fairchild Profile Icon Harman
Arrow right icon
€8.99 €32.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (7 Ratings)
eBook Jun 2016 428 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Carol Fairchild Profile Icon Harman
Arrow right icon
€8.99 €32.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (7 Ratings)
eBook Jun 2016 428 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

ROS Robotics By Example

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 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 a 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
  • How to...

Rviz

Rviz, abbreviation for ROS visualization, is a powerful 3D visualization tool for ROS. It allows the user to view the simulated robot model, 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. ROS topics will be displayed as live representations based on the sensor data published by any cameras, infrared sensors, and laser scanners that are part of the robot's system. This can be useful to...

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...

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. Xacro (XML Macros) 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 www.PacktPub.com...

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 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.

In Chapter 5, Creating Your First Robot Arm (in Simulation), we will extend our understanding of URDF by learning more about Xacro. We will build a Xacro file to define a robot model for a robot arm.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • This book will help you boost your knowledge of ROS and give you advanced practical experience you can apply to your ROS robot platforms
  • This is the only book that offers you step-by-step instructions to solidify your ROS understanding and gain experience using ROS tools
  • From eminent authors, this book offers you a plethora of fun-filled examples to make your own quadcopter, turtlebot, and two-armed robots

Description

The visionaries who created ROS developed a framework for robotics centered on the commonality of robotic systems and exploited this commonality in ROS to expedite the development of future robotic systems. From the fundamental concepts to advanced practical experience, this book will provide you with an incremental knowledge of the ROS framework, the backbone of the robotics evolution. ROS standardizes many layers of robotics functionality from low-level device drivers to process control to message passing to software package management. This book provides step-by-step examples of mobile, armed, and flying robots, describing the ROS implementation as the basic model for other robots of these types. By controlling these robots, whether in simulation or in reality, you will use ROS to drive, move, and fly robots using ROS control.

Who is this book for?

If you are a robotics developer, whether a hobbyist, researchers or professional, and are interested in learning about ROS through a hands-on approach, then this book is for you. You are encouraged to have a working knowledge of GNU/Linux systems and Python.

What you will learn

  • Get to know the fundamentals of ROS and apply its concepts to real robot examples
  • Control a mobile robot to navigate autonomously in an environment
  • Model your robot designs using URDF and Xacro, and operate them in a ROS Gazebo simulation
  • Control a 7 degree-of-freedom robot arm for visual servoing
  • Fly a quadcopter to autonomous waypoints
  • Gain working knowledge of ROS tools such as Gazebo, rviz, rqt, and Move-It
  • Control robots with mobile devices and controller boards

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 30, 2016
Length: 428 pages
Edition : 1st
Language : English
ISBN-13 : 9781785286704
Category :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jun 30, 2016
Length: 428 pages
Edition : 1st
Language : English
ISBN-13 : 9781785286704
Category :
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 129.97
Effective Robotics Programming with ROS
€41.99
Mastering ROS for Robotics Programming
€45.99
ROS Robotics By Example
€41.99
Total 129.97 Stars icon
Banner background image

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. Extending Your ROS Abilities Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(7 Ratings)
5 star 57.1%
4 star 28.6%
3 star 0%
2 star 14.3%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Blcros97 Sep 22, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
More than any other focus, I have read though Chapter 6: "Wobbling Robot Arms Using Joint Control". Whether this is the beginning of a hobby, or you have a passion for robotics, this is a succinct and well organized reference tool designed to help you succeed in the topics offered. I say this now with firsthand experience with Baxter and the simulator in Gazebo.I've always had an intrigue towards the world of robotics, but these past few months have served as an incredible foundation. This book was an immense contributing factor. Even through browsing the other chapters with limited knowledge, I can recommend this book to anyone wanting to learn more about ROS.Thank you Carol and Thomas.
Amazon Verified review Amazon
Kimberly Hambuchen Oct 15, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Let me start this review by saying I've worked with ROS since 2011, and recently taught an introductory robotics course in which I briefly covered ROS. This book is very detailed on the tools ROS provides and gives excellent explanations of the functions for each tool/command described.The introductory chapters provide good information on why ROS is so important, how to use the common tools in the ROS environment, and instructions on how to use these tools. Often, the authors provide hints and suggestions on how to manage errors that are common upon install and use, which is very helpful for those new to ROS or learning ROS on their own. Most of the coverage is embedded in running examples, and while I would appreciate a chapter that explains the tools before diving into using them, the setup of the chapters still works for learning about the system.All of the common tools are covered, such as rqt and Rviz, but the authors also delve into using Gazebo, MoveIt! and ros_control. This book definitely covers more than just "ROS" and can serve as the main text for an entire class on ROS. It is assumed that the user of this text has a cursory knowledge of robotics, such as PID control and navigation for mobile robots, but many items are explained briefly for the user. There is also in-depth coverage of sensory data, what to do with that data and how it can be helpful in the control of robots.The highlight of this book is that it covers multiple types of robots, and how to use their simulations and control them. Mobile robots (TurtleBot), manipulators (Baxter) and UAVs are all covered in multiple chapters. There are also excellent explanations of TF, MoveIt! and RViz. I would like to see more about the catkin system and a deeper explanation of the ROS package system, but this text covers the basics of those.The authors also present many commonly used ROS packages and how to interact with those. There are also very good instructions for using Ubuntu 14.04 along the way, and again, sections that provide troubleshooting suggestions that lend to common errors and issues that can pop up when using that ROS on that OS.If I were to prepare for a semester-long ROS class, I would definitely use this book as the main text. I think this book can provide a very good introductory session to ROS, and would expect that after working through the entire text, students would be able to go about creating ROS packages for a robot, Gazebo simulations of the robot and user interfaces for commanding and interacting with that robot.
Amazon Verified review Amazon
Shweta Gupte Sep 19, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a great book for someone looking to get started with ROS and go all the way to implementing a complete project using ROS. It starts with detailed step-by-step instructions for installing and setting up ROS and goes on to cover all the basic concepts including catkin workspaces, nodes, topics, services, messages, etc.The book focuses on learning through hands-on practice. It contains detailed code snippets to get you started with coding. The book introduces different simulation and visualization tools along with their setup guidelines. It covers Turtlesim, Gazebo, rviz etc.The examples used here cover a variety of robot types. Starting with a simulated Turtlebot, the books goes on the use more complex examples using 7 DOF manipulator robot and quadrotors. The book has good references for further study.
Amazon Verified review Amazon
John Hudson Dec 28, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This guide to ROS accomplished everything it intended to do, and served as an excellent intro to the world of embedded Linux and robotics. Highly recommended.
Amazon Verified review Amazon
Kesava Prasad May 29, 2017
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
great
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.