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
unknown macro name: xacro:mavlink_interface_macro
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.
For more infos, see http://wiki.ros.org/xacro#Processing_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
self._load_config()
File "/opt/ros/jade/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File "/opt/ros/jade/lib/python2.7/dist-packages/roslaunch/config.py", line 453, in load_config_default
raise RLException(e)
`RLException: while processing`
/home/u23/WorkSpace/03.fixedwing_sim_pix/04.Firmware/Firmware/launch/spawn_fixed_wing ...
Please show your xacro file. Are you
xacro:include
-ing the correct.xacro
file (ie: the one that defines themavlink_interface_macro
macro)?And ignore the
Invalid <param> tag
error: as your xacro conversion is failing, the spawner just can't find any urdf inrobot_description
, so bails.Yes. I defined the
mavlink_interface_macro
macro in filecomponent_snippets.xacro
, and included it:I have checked the definition, and I am quite sure it is correct.
I got your idea of the
Invalid <param> tag error
. I think there might be something wrong with the configuration of themavlink_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.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.
Sure. Hope I have provided something meaningful.