Ask Your Question
0

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

asked 2017-03-11 03:24:04 -0500

Yajing_Wang gravatar image

updated 2017-03-11 08:29:01 -0500

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 ...
(more)
edit retag flag offensive close merge delete

Comments

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.

gvdhoorn gravatar image gvdhoorn  ( 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.

Yajing_Wang gravatar image Yajing_Wang  ( 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.

Yajing_Wang gravatar image Yajing_Wang  ( 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.

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

Sure. Hope I have provided something meaningful.

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

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-03-13 03:05:19 -0500

Yajing_Wang gravatar image

updated 2017-03-13 03:07:10 -0500

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.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-03-11 03:24:04 -0500

Seen: 1,932 times

Last updated: Mar 13 '17