-
-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Consider the following two xacro files:
parent.xacro
<?xml version="1.0" ?>
<robot name="example" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:arg name="gazebo" default="false"/>
<xacro:include filename="child.xacro">
<xacro:arg name="gazebo" value="False" />
</xacro:include>
<xacro:if value="$(arg gazebo)">
<link name="test" />
</xacro:if>
</robot>child.xacro
<?xml version="1.0" ?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:arg name="gazebo" default="false"/>
<xacro:if value="$(arg gazebo)">
<link name="test" />
</xacro:if>
</robot>Running xacro --inorder parent.xacro gazebo:=true results in
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from parent.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="example" xmlns:xacro="http://www.ros.org/wiki/xacro">
<link name="test"/>
<link name="test"/>
</robot>I'd expect there to be only one <link>, but it seems that I cannot set the value of the argument in an included xacro file. I've seen a few xacro files out there trying to set arguments in includes so I thought this was possible (ex1, ex2), but I can't make it work. Is this a regression or a bug? Am I missing something?
rickstaa, rcywongaa and shmpwk
Metadata
Metadata
Assignees
Labels
No labels