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

I'm not aware of this kind of workaround and it doesn't seem possible.

What you can do is instead of having multiple <xacro:include ..../> tags in all of your urdf files is to can create a new file like standalone.urdf.xacro (i usually do my_robot_name_standalone.urdf.xacro) and inside it you only use the <xacro:include../> to add all of your urdf files (which have no includes anymore). With that you ensure to avoid multiple inclusions. Here's an exemple :

<?xml version="1.0"?>
<robot name="my_robot"
       xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
       xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
       xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
       xmlns:xacro="http://ros.org/wiki/xacro">

  <xacro:include filename="$(find my_robot_description)/urdf/common_properties.urdf.xacro" />
  <xacro:include filename="$(find my_robot_description)/urdf/my_robot.urdf.xacro" />
</robot>