ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Revision history [back]

Seems that the script jackal_description/urdf/jackal.urdf.xacro is not using properly Xacro's conditional blocks

You can see it by yourself looking at the code:

  <!-- Optional custom includes. -->
  <xacro:if value="$(optenv JACKAL_URDF_EXTRAS 0)">
    <xacro:include filename="$(env JACKAL_URDF_EXTRAS)" />

Xacros's conditional block (xacro:if) expects value to be 0, 1, true or false. When the environment variable JACKAL_URDF_EXTRAS is not set then $(optenv JACKAL_URDF_EXTRAS 0) evaluates to 0 (which is correct), but when you do export JACKAL_URDF_EXTRAS=~/somepath it evaluates to ~/somepath (which makes xacro:if fail)

A possible solution would be:

In addition to export JACKAL_URDF_EXTRAS=... (according to also do:


And then change the code in jackal_description/urdf/jackal.urdf.xacro to:

  <!-- Optional custom includes. -->
  <xacro:if value="$(optenv USE_JACKAL_URDF_EXTRAS 0)">
    <xacro:include filename="$(env JACKAL_URDF_EXTRAS)" />

This will tell jackal_description/urdf/jackal.urdf.xacro to load JACKAL_URDF_EXTRAS when USE_JACKAL_URDF_EXTRAS is set to 1 or true.

I hope this helps