Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Learning ROS for Robotics Programming Second Edition
  • Toc
  • feedback
Learning ROS for Robotics Programming Second Edition

Learning ROS for Robotics Programming Second Edition

By : Mahtani, Aaron Martinez
4 (8)
close
Learning ROS for Robotics Programming Second Edition

Learning ROS for Robotics Programming Second Edition

4 (8)
By: Mahtani, Aaron Martinez

Overview of this book

If you have ever tried building a robot, then you know how cumbersome programming everything from scratch can be. This is where ROS comes into the picture. It is a collection of tools, libraries, and conventions that simplifies the robot building process. What’s more, ROS encourages collaborative robotics software development, allowing you to connect with experts in various fields to collaborate and build upon each other's work. Packed full of examples, this book will help you understand the ROS framework to help you build your own robot applications in a simulated environment and share your knowledge with the large community supporting ROS. Starting at an introductory level, this book is a comprehensive guide to the fascinating world of robotics, covering sensor integration, modeling, simulation, computer vision, navigation algorithms, and more. You will then go on to explore concepts like topics, messages, and nodes. Next, you will learn how to make your robot see with HD cameras, or navigate obstacles with range sensors. Furthermore, thanks to the contributions of the vast ROS community, your robot will be able to navigate autonomously, and even recognize and interact with you in a matter of minutes. What’s new in this updated edition? First and foremost, we are going to work with ROS Hydro this time around. You will learn how to create, visualize, and process Point Cloud information from different sensors. This edition will also show you how to control and plan motion of robotic arms with multiple joints using MoveIt! By the end of this book, you will have all the background you need to build your own robot and get started with ROS.
Table of Contents (12 chapters)
close
11
Index

Xacro – a better way to write our robot models


Notice the size of the robot1_physics.urdf file. It has 314 lines of code to define our robot. Imagine adding cameras, legs, and other geometries—the file will start increasing, and the maintenance of the code will become more complicated.

Xacro helps in reducing the overall size of the URDF file and makes it easier to read and maintain. It also allows us to create modules and reutilize them to create repeated structures such as several arms or legs.

To start using xacro, we need to specify a namespace so that the file is parsed properly. For example, these are the first two lines of a valid xacro file:

<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="robot1_xacro">

In the preceding lines, we define the name of the model, which in this case is robot1_xacro. Remember that the file extension will be .xacro instead of .urdf.

Using constants

We can use xacro to declare constant values; hence, we can avoid putting...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete