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
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (7 Ratings)
Paperback Jun 2016 428 pages 1st Edition
eBook
$38.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Carol Fairchild Profile Icon Harman
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (7 Ratings)
Paperback Jun 2016 428 pages 1st Edition
eBook
$38.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$38.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.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

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 : 9781782175193
Category :
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 : Jun 30, 2016
Length: 428 pages
Edition : 1st
Language : English
ISBN-13 : 9781782175193
Category :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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
$279.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 $ 170.97
Effective Robotics Programming with ROS
$54.99
Mastering ROS for Robotics Programming
$60.99
ROS Robotics By Example
$54.99
Total $ 170.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. 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

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.