Problem with xacro:if value="${model_type == A_model_type}"
I'm trying to set up a Xacro where one section is based on a Model type passed as an argument (the first line below would be an external argument). No matter what model_type is set to, model A, B and C get included. I can get this to work by having a separate variable set to true/false for each model, but it's ugly. The following always loads all three models. I'm using Indigo.
<!-- The model we want loaded -->
<xacro:property name="model_type" value="3"/>
<!-- The different possibilities -->
<xacro:property name="A_model_type" value="2"/>
<xacro:property name="B_model_type" value="3"/>
<xacro:property name="C_model_type" value="4"/>
<!-- Only load the specified model -->
<xacro:if value="${model_type == A_model_type}">
<xacro:include filename="/urdf/A_model.xacro"/>
</xacro:if>
<xacro:if value="${model_type == B_model_type}">
<xacro:include filename="/urdf/B_model.xacro"/>
</xacro:if>
<xacro:if value="${model_type == C_model_type}">
<xacro:include filename="/urdf/C_model.xacro"/>
</xacro:if>