# Gazebo: Invalid <param> tag: Cannot load command parameter [robot_description]

My original package worked well. But after I added a mavlink_interface_macro to my xacro file of the model, I got the following error:

when processing file: /home/u23/WorkSpace/03.fixedwing_sim_pix/04.Firmware/Firmware/Tools/sitl_gazebo/models/techpod/techpod_base.xacro

when processing file: /home/u23/WorkSpace/03.fixedwing_sim_pix/04.Firmware/Firmware/Tools/sitl_gazebo/models/techpod/techpod_base.xacro

while processing /home/u23/WorkSpace/03.fixedwing_sim_pix/04.Firmware/Firmware/launch/spawn_fixed_wing.launch:

Invalid <param> tag: Cannot load command parameter [robot_description]: command [     /opt/ros/jade/share/xacro/xacro.py '/home/u23/WorkSpace/03.fixedwing_sim_pix/04.Firmware/Firmware/Tools/sitl_gazebo/models/techpod/techpod_base.xacro'     enable_logging:=false     enable_ground_truth:=true     log_file:=techpod     wait_to_record_bag:=false     uav_name:=techpod     namespace:=techpod] returned with code [2].

Param xml is <param command="     $(find xacro)/xacro.py '$(arg model)'     enable_logging:=$(arg enable_logging) enable_ground_truth:=$(arg enable_ground_truth)     log_file:=$(arg log_file) wait_to_record_bag:=$(arg wait_to_record_bag)     uav_name:=$(arg uav_name) namespace:=$(arg namespace)" name="robot_description"/>

The traceback for the exception was written to the log file


I checked the xacro file to make sure the mavlink_interface_macro was defined and added in the corrected way. Before I added it the param [robot_description] was also successfully loaded.

I tried some ways I saw from other examples, like:

rosrun xacro xacro my_model_name.xacro > /tmp/old.xml


I got:

Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
redefining global property: pi
when processing file: techpod_base.xacro
Undefined substitution argument namespace
when evaluating expression 'namespace'
when processing file: techpod_base.xacro


However the expression namespace works well when quoted in other macro. I am confused of the relations between the two errors. I checked the log file, which shows:

Invalid <param> tag: Cannot load command parameter [robot_description]: command [     /opt/ros/jade/share/xacro/xacro.py '/home/u23/WorkSpace/03.fixedwing_sim_pix/04.Firmware/Firmware/Tools/sitl_gazebo/models/techpod/techpod_base.xacro'     enable_logging:=false     enable_ground_truth:=true     log_file:=techpod     wait_to_record_bag:=false     uav_name:=techpod     namespace:=techpod] returned with code [2].
Param xml is <param command="     $(find xacro)/xacro.py '$(arg model)'     enable_logging:=$(arg enable_logging) enable_ground_truth:=$(arg enable_ground_truth)     log_file:=$(arg log_file) wait_to_record_bag:=$(arg wait_to_record_bag)     uav_name:=$(arg uav_name) namespace:=$(arg namespace)" name="robot_description"/>
[roslaunch][ERROR] 2017-03-11 16:06:37,576: The traceback for the exception was written to the log file
[roslaunch][ERROR] 2017-03-11 16:06:37,577: Traceback (most recent call last):
File "/opt/ros/jade/lib/python2.7/dist-packages/roslaunch/__init__.py", line 307, in main
p.start()
File "/opt/ros/jade/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start
self._start_infrastructure()
File "/opt/ros/jade/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
raise RLException(e)
RLException: while processing
/home/u23/WorkSpace/03.fixedwing_sim_pix/04.Firmware/Firmware/launch/spawn_fixed_wing ...
edit retag close merge delete

Please show your xacro file. Are you xacro:include-ing the correct .xacro file (ie: the one that defines the mavlink_interface_macro macro)?

And ignore the Invalid <param> tag error: as your xacro conversion is failing, the spawner just can't find any urdf in robot_description, so bails.

( 2017-03-11 04:28:19 -0500 )edit

Yes. I defined the mavlink_interface_macro macro in file component_snippets.xacro, and included it:

<xacro:include filename="\$(find rotors_description)/urdf/component_snippets.xacro" />


I have checked the definition, and I am quite sure it is correct.

( 2017-03-11 06:23:23 -0500 )edit

I got your idea of the Invalid <param> tag error. I think there might be something wrong with the configuration of the mavlink_interface plugin which causes the error. I would have a check and try. Thanks for your reply. I would be glad if you can give me more advice.

( 2017-03-11 06:26:54 -0500 )edit

Can you please edit your original question and add some lines around where you include the xacro, where you instantiate it and where you define it? Barring any sort of unknown bug, this is most likely a typo or some other minor mistake. but without seeing what you're doing we can only guess.

( 2017-03-11 07:29:44 -0500 )edit

Sure. Hope I have provided something meaningful.

( 2017-03-11 08:30:42 -0500 )edit

Sort by » oldest newest most voted

Finally I found the stupid mistake I have made.

In the instantiation of the macro, I missed the third parameter, since I thought it could load the default value as well.

more