Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Xacro if statement evaluation order

Hey,

I am using xacro v1.9.5 with ros indigo but it seems I have run into a bug.

When I use the following code:

<?xml version="1.0"?>
<robot name="test"  xmlns:xacro="http://ros.org/wiki/xacro">

  <xacro:if value="${1==0}" >
     <geometry>
        <cylinder radius="1.0" length="1.0"/>
     </geometry>
  </xacro:if >

</robot>

the if statement will be evaluated as true. It looks like that only the first value is taken into account.

Am I using it wrong or is this a known bug?