ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Invalid roslaunch XML syntax: not well-formed (invalid token):

asked 2019-05-16 19:39:33 -0500

Jose-Araujo gravatar image

updated 2019-05-16 22:00:44 -0500

jayess gravatar image

Launch file

<launch>
        <arg name="model" />
        <command="$(find xacro)/xacro.py $(find mastering_ros_robot_description_pkg)/urdf/seven_dof_arm.xacro" param name="robot_description" />
        <param name="use_gui" value="true" />
        <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
        <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
        <node name="rviz" pkg="rviz" type="rviz" args="-d $(find mastering_ros_robot_description_pkg)/urdf.rviz" required="true" />
</launch>

I don't know what's wrong. Every time that I try run appear the same error: RLException: Invalid roslaunch XML syntax: not well-formed (invalid token): line 3, column 9 The traceback for the exception was written to the log file

I checked the line, but there is nothing wrong.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-05-16 22:07:56 -0500

jayess gravatar image

Like the error says, you have invalid syntax in your launch file. The line

<command="$(find xacro)/xacro.py $(find mastering_ros_robot_description_pkg)/urdf/seven_dof_arm.xacro" param name="robot_description" />

Should probably be

<param name="robot_description" command="$(find xacro)/xacro.py $(find mastering_ros_robot_description_pkg)/urdf/seven_dof_arm.xacro" />

I found it on the Qbotics Labs GitHub repo.

edit flag offensive delete link more

Comments

So, when I use:

<param name="robot_description" command="$(find xacro)/xacro.py $(find mastering_ros_robot_description_pkg)/urdf/seven_dof_arm.xacro" />

Appear this erro:

RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [/home/jose/catkin_ws/src/xacro/xacro.py /home/jose/catkin_ws/src/mastering_ros_robot_description_pkg/urdf/seven_dof_arm.xacro] returned with code [2]. 

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

And when I use:

<command="$(find xacro)/xacro.py $(find mastering_ros_robot_description_pkg)/urdf/seven_dof_arm.xacro" param name="robot_description" />

Appear this:

RLException: Invalid roslaunch XML syntax: not well-formed (invalid token): line 3, column 9.
The traceback for the exception was written to the log file
Jose-Araujo gravatar image Jose-Araujo  ( 2019-05-16 23:40:04 -0500 )edit
1

@Jose-Araujo The format @jayess suggested is definitely right. You are setting a parameter called robot_description to a rosparam server by processing the seven_dof_arm.xacro file. This file needs to have this xacro header

<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="<your_robot>">

and needs to result in valid URDF file. That is if you use

rosrun xacro xacro path/to/seven_dof_arm.xacro > model.urdf

to convert the xacro file into URDF, and then

check_urdf model.urdf

to check validity of the URDF file.

It needs to say all is well formatted and print the structure tree into the terminal. So try those commands and see what it tells us.

kump gravatar image kump  ( 2019-05-17 01:01:23 -0500 )edit

It's running now. I find an error on xacro and changed what @kump and @jayess said. Thank you!

Jose-Araujo gravatar image Jose-Araujo  ( 2019-05-17 18:00:21 -0500 )edit

@Jose-Araujo That's great. Could you please click on the check mark (✓) to the left of the question to mark it as correct?

jayess gravatar image jayess  ( 2019-05-17 18:10:07 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-05-16 19:39:33 -0500

Seen: 3,042 times

Last updated: May 16 '19