ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
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)" />
  </xacro:if>

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 http://www.clearpathrobotics.com/assets/guides/ros/ROS%20Navigation%20Basics.html#customization) also do:

export USE_JACKAL_URDF_EXTRAS=1

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)" />
  </xacro:if>

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