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 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
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 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
[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.launch:
Invalid 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_ga zebo/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
Could someone give me some instructions? I would be really grateful.
In addition:
Here is the definition of the `mavlink_interface_macro` in the file `component_snippets.xacro`:
${namespace} ${imu_sub_topic} /gazebo/command/motor_speed
File `techpod_base.xacro` is the source file with which I spawn the model. In this file I include the former `component_snippets.xacro` file, and instantiate the `mavlink_interface_macro`:
...
↧