Using the math expression

We can build mathematical expressions inside ${} using basic operations such as +, -, * , / , unary minus, and parenthesis. Exponentiation and modulus are not supported yet. The following is a simple math expression used inside the code:

  <cylinder length="${pan_link_length}"  radius="${pan_link_radius+0.02}"/>    

Get Mastering ROS for Robotics Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.