ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Xacro in-order processing for husky_gazebo

asked 2020-06-04 19:55:38 -0500

ildaniel gravatar image

After trying to run the following command

roslaunch husky_gazebo husky_playpen.launch

from this tutorial: http://wiki.ros.org/husky_navigation/...

I encounter the following error:

... logging to /home/daniel/.ros/log/2e76d420-a6c4-11ea-afba-2390d77f85eb/roslaunch-daniel-Inspiron-7559-14421.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
xacro: in-order processing became default in ROS Melodic. You can drop the option.
'bool' object has no attribute 'lower' 
when evaluating expression 'topbar_needed_kinect.lower() == 'true' or topbar_needed_kinect == '1' or topbar_needed_realsense == 'true' or topbar_needed_realsense == '1''

when processing file: /home/daniel/husky_ws/src/husky_description/urdf/husky.urdf.xacro
RLException: while processing /home/daniel/husky_ws/src/husky_gazebo/launch/spawn_husky.launch:
while processing /home/daniel/husky_ws/src/husky_control/launch/control.launch:
while processing /home/daniel/husky_ws/src/husky_description/launch/description.launch:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/noetic/lib/xacro/xacro', '/home/daniel/husky_ws/src/husky_description/urdf/husky.urdf.xacro', '--inorder', 'robot_namespace:=/', 'laser_enabled:=true', 'kinect_enabled:=false', 'realsense_enabled:=false', 'urdf_extras:=']] returned with code [2]. 

Param xml is <param name="robot_description" command="$(find xacro)/xacro '$(find husky_description)/urdf/husky.urdf.xacro'     --inorder     robot_namespace:=$(arg robot_namespace)     laser_enabled:=$(arg laser_enabled)     kinect_enabled:=$(arg kinect_enabled)     realsense_enabled:=$(arg realsense_enabled)     urdf_extras:=$(arg urdf_extras)     "/>
The traceback for the exception was written to the log file
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-06-05 04:21:14 -0500

Weasfas gravatar image

Hi @ildaniel,

From ROS Melodic you do not need to include the --inorder option when launching Xacro, so you can drop it to avoid that warning:

<param name="robot_description"
   command="$(find xacro)/xacro '$(find husky_description)/urdf/husky.urdf.xacro' arg1:=... />

The last error is due to a lack of arguments, If you look at the value fetched into urdf_extras you will see that it is empty; this is because the value loaded through the launch file is trying to extract it from an enviroment variable that I am sure you did not set in your terminal:

<arg name="urdf_extras" default="$(optenv HUSKY_URDF_EXTRAS/>

If you look closely you will find it is the only argument in that launch file which does not have a default value.

Try to export that variable ans see if that works

export HUSKY_URDF_EXTRAS=...

Cheers.

edit flag offensive delete link more

Comments

Thanks for your response! i removed the --inorder option and the urdf_extras because I don't want to customize the model now. I also had to remove the .lower() from topbar_needed_kinect.lower() to loose the first error.

ildaniel gravatar image ildaniel  ( 2020-06-05 12:58:00 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-06-04 19:55:38 -0500

Seen: 1,724 times

Last updated: Jun 05 '20