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.
Originally posted by jayess with karma: 6155 on 2019-05-16
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by Jose-Araujo on 2019-05-16:
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
Comment by kump on 2019-05-17:
@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.
Comment by Jose-Araujo on 2019-05-17:
It's running now.
I find an error on xacro and changed what @kump and @jayess said.
Thank you!
Comment by jayess on 2019-05-17:
@Jose-Araujo That's great. Could you please click on the check mark (✓) to the left of the question to mark it as correct?