Ask Your Question
0

Using pointgrey camera in simulation environment

asked 2017-08-13 18:23:12 -0600

rsmitha gravatar image

updated 2017-08-13 20:37:06 -0600

Hello,

I am using the jackal from Clearpath robotics. I have installed the required packages and drivers for the pointgrey camera. I wanted to be able to use the camera in simulation environment with gazebo. How do I launch the camera in the simulation environment. I followed the instructions at: http://www.clearpathrobotics.com/asse...

These speak of using the custom urdf file for camera specs. But when I do a roslaunch after that, I get the following error:

Xacro conditional "$(optenv JACKAL_URDF_EXTRAS 0)" to: evaluated"/home/bru/dev/SensorFusionAndControl/BasicJackalNavigation/src/jackal/jackal_description/urdf/custom_example.urdf", which is not a boolean expression.

when processing file:    
/home/bru/dev/SensorFusionAndControl/BasicJackalNavigation/src/jackal/jackal_description/urdf/jackal.urdf.xacro

while processing /home/bru/dev/SensorFusionAndControl/BasicJackalNavigation/src/jackal/jackal_description/launch/description.launch:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/lib/jackal_description/env_run
/home/bru/dev/SensorFusionAndControl/BasicJackalNavigation/src/jackal/jackal_description/urdf/configs/base /opt/ros/indigo/lib/xacro/xacro /home/bru/dev/SensorFusionAndControl/BasicJackalNavigation/src/jackal/jackal_description/urdf/jackal.urdf.xacro --inorder] returned with code [2].

Param xml is:
"param command="$(find jackal_description)/scripts/env_run $(find jackal_description)/urdf/configs/$(arg config) $(find xacro)/xacro $(find jackal_description)/urdf/jackal.urdf.xacro --inorder" name="robot_description"

The traceback for the exception was written to the log file

What am I not doing here? Please help and advise.

Regards, rsmitha.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-13 21:12:47 -0600

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/asse... ) 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

edit flag offensive delete link more

Comments

Thanks, Martin. It works. I can see the topics related to camera information being published under /image_raw.

rsmitha gravatar imagersmitha ( 2017-08-14 04:14:06 -0600 )edit

I am glad it worked, enjoy!

Martin Peris gravatar imageMartin Peris ( 2017-08-14 04:16:40 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-08-13 18:23:12 -0600

Seen: 185 times

Last updated: Aug 13 '17