ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You might want to take a look at the xacro wiki page, specifically point 7. The origin parameter is a block parameter and can be used like this:

<xacro:VLP16>  
  <origin xyz="1 2 3" rpy="0 0 0" />  
</xacro:VLP16>

You can find a corresponding <xacro:insert_block name="origin" /> tag in your xacro file.

One additional thing: Declaring properties will not actually pass them to the macro. Depending on your macro complexity it might still be nice to have them as properties, but you need to pass them on explicitly:

<xacro:VLP16 parent=${parent} name=${name} ...>  
  <origin xyz="1 2 3" rpy="0 0 0" />  
</xacro:VLP16>

In that case you might want to rename your properties for clarity, e.g. by giving them a sensor-specific prefix.

As a further note, you don't need the name=robot_name in the <robot> tag of your vlp16 xacro file if you don't plan on using it "by itself".