AdaCompNUS / despot_tutorials

Tutorials for using DESPOT with ROS
GNU General Public License v2.0
23 stars 14 forks source link

Error when launching example laser_tag.launch #1

Open autonomobil opened 4 years ago

autonomobil commented 4 years ago

Succesfully build everything, but roslaunching does not work:

~/despot_ws$ roslaunch laser_tag laser_tag.launch R1_noise:=0.5
... logging to /home/mo/.ros/log/085fd8f4-3bd5-11ea-87ff-6cf04971af50/roslaunch-mo-P55M-UD2-24033.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: 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
inconsistent namespace redefinitions for xmlns:xacro:
 old: http://playerstage.sourceforge.net/gazebo/xmlschema/#interface
 new: http://ros.org/wiki/xacro (/home/mo/despot_ws/src/despot_tutorials/robots/youbot/youbot_description/urdf/youbot_base/base.urdf.xacro)
inconsistent namespace redefinitions for xmlns:xacro:
 old: http://playerstage.sourceforge.net/gazebo/xmlschema/#interface
 new: http://ros.org/wiki/xacro (/home/mo/despot_ws/src/despot_tutorials/robots/youbot/youbot_description/urdf/sensors/hokuyo_urg04_laser.urdf.xacro)
redefining global property: pi
when processing file: /home/mo/despot_ws/src/despot_tutorials/robots/youbot/youbot_description/robots/youbot_base_laser.urdf.xacro
deprecated: xacro tags should be prepended with 'xacro' xml namespace.
Use the following script to fix incorrect usage:
        find . -iname "*.xacro" | xargs sed -i 's#<\([/]\?\)\(if\|unless\|include\|arg\|property\|macro\|insert_block\)#<\1xacro:\2#g'
when processing file: /home/mo/despot_ws/src/despot_tutorials/robots/youbot/youbot_description/robots/youbot_base_laser.urdf.xacro

Property names must be valid python identifiers:  None None
when processing file: /home/mo/despot_ws/src/despot_tutorials/robots/youbot/youbot_description/robots/youbot_base_laser.urdf.xacro
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/share/xacro/xacro.py /home/mo/despot_ws/src/despot_tutorials/robots/youbot/youbot_description/robots/youbot_base_laser.urdf.xacro] returned with code [2]. 

Param xml is <param command="$(find xacro)/xacro.py $(find youbot_description)/robots/youbot_base_laser.urdf.xacro" name="robot_description"/>
The traceback for the exception was written to the log file

I did the suggested command:

find . -iname "*.xacro" | xargs sed -i 's#<\([/]\?\)\(if\|unless\|include\|arg\|property\|macro\|insert_block\)#<\1xacro:\2#g'

Then the error is:

Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: 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
XML parsing error: unbound prefix: line 4, column 1
when processing file: /home/mo/despot_ws/src/despot_tutorials/robots/youbot/youbot_description/urdf/common.xacro
included from: /home/mo/despot_ws/src/despot_tutorials/robots/youbot/youbot_description/robots/youbot_base_laser.urdf.xacro

Check that:
 - Your XML is well-formed
 - You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/share/xacro/xacro.py /home/mo/despot_ws/src/despot_tutorials/robots/youbot/youbot_description/robots/youbot_base_laser.urdf.xacro] returned with code [2]. 

Param xml is <param command="$(find xacro)/xacro.py $(find youbot_description)/robots/youbot_base_laser.urdf.xacro" name="robot_description"/>
The traceback for the exception was written to the log file

System:

cindycia commented 4 years ago

The error was due to updates of the xacro interface since ROS Kenetic.

I have updated the .xacro files and validated the code with ROS Melodic. Simply check out the "ros_melodic" branch. The code should also work with Kinetic.