Skip to Content
ROS Programming: Building Powerful Robots
book

ROS Programming: Building Powerful Robots

by Anil Mahtani, Luis Sanchez, Enrique Fernandez, Aaron Martinez, Lentin Joseph
March 2018
Intermediate to advanced content levelIntermediate to advanced
1396 pages
42h 14m
English
Packt Publishing
Content preview from ROS Programming: Building Powerful Robots

Using properties

Using xacro, we can declare constants or properties that are the named values inside the xacro file, which can be used anywhere in the code. The main use of these constant definitions are, instead of giving hard coded values on links and joints, we can keep constants like this and it will be easier to change these values rather than finding the hard coded values and replacing them.

An example of using properties are given here. We declare the base link and pan link's length and radius. So, it will be easy to change the dimension here rather than changing values in each one:

 <xacro:property name="base_link_length" value="0.01" /> <xacro:property name="base_link_radius" value="0.2" /> <xacro:property name="pan_link_length" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Robots with ROS

Programming Robots with ROS

Morgan Quigley, Brian Gerkey, William D. Smart
Machine Learning Design Patterns

Machine Learning Design Patterns

Valliappa Lakshmanan, Sara Robinson, Michael Munn

Publisher Resources

ISBN: 9781788627436Supplemental Content