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

error met in joint_state_publisher when using rviz to read URDF file

asked 2016-05-01 08:07:15 -0500

WYX gravatar image

updated 2016-05-01 08:22:17 -0500

gvdhoorn gravatar image

I want to use rviz to visualize my URDF model (it passes check_urdf) and verify if it is correct, as it is generated by Solidworks Add-Ins. While when I roslaunch display.launch, things go wrong. It seems that joint_state_publisher-1 failed. Could someone tell me what is the reason and some possible solutions?

Thank you, I have been stuck here for a long time.

The following is the information in Terminal:

yx@ubuntu://home/yx/Desktop/halobject/src/halobject$ roslaunch halobject display.launch
... logging to /home/yx/.ros/log/8239943a-0f92-11e6-bfff-000c29b98697/roslaunch-ubuntu-7565.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.
started roslaunch server http://ubuntu:39226/

 * /robot_description: <?xml version="1....
 * /rosdistro: indigo
 * /rosversion: 1.11.19
 * /use_gui: True
    joint_state_publisher (joint_state_publisher/joint_state_publisher)
    robot_state_publisher (robot_state_publisher/state_publisher)
    rviz (rviz/rviz)
core service [/rosout] found
process[joint_state_publisher-1]: started with pid [7583]
process[robot_state_publisher-2]: started with pid [7584]
process[rviz-3]: started with pid [7585]
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher", line 343, in <module>
    jsp = JointStatePublisher()
  File "/opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher", line 26, in __init__
    robot = xml.dom.minidom.parseString(description).getElementsByTagName('robot')[0]
  File "/usr/lib/python2.7/xml/dom/", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: unclosed token: line 1, column 0
[joint_state_publisher-1] process has
died [pid 7583, exit code 1, cmd
/opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/yx/.ros/log/8239943a-0f92-11e6-bfff-000c29b98697/joint_state_publisher-1.log].
log file:

The log file for error is as follows:

[rospy.client][INFO] 2016-05-01 05:53:40,694: init_node, name[/joint_state_publisher], pid[8254]
[xmlrpc][INFO] 2016-05-01 05:53:40,694: XML-RPC server binding to
[xmlrpc][INFO] 2016-05-01 05:53:40,695: Started XML-RPC server [http://ubuntu:42948/]
[rospy.impl.masterslave][INFO] 2016-05-01 05:53:40,695: _ready: http://ubuntu:42948/
[xmlrpc][INFO] 2016-05-01 05:53:40,695: xml rpc node: starting XML-RPC server
[rospy.registration][INFO] 2016-05-01 05:53:40,695: Registering with master node http://localhost:11311
[rospy.init][INFO] 2016-05-01 05:53:40,697: ROS Slave URI: [http://ubuntu:42948/]
[rospy.init][INFO] 2016-05-01 05:53:40,697: registered with master
[rospy.rosout][INFO] 2016-05-01 05:53:40,697: initializing /rosout core topic
[rospy.rosout][INFO] 2016-05-01 05:53:40,699: connected to core topic /rosout
[rospy.simtime][INFO] 2016-05-01 05:53:40,701: /use_sim_time is not set, will not subscribe to simulated time [/clock] topic
[rospy.core][INFO] 2016-05-01 05:53:40,723: signal_shutdown [atexit]
[rospy.impl.masterslave][INFO] 2016-05-01 05:53:40,726: atexit

I use a normal launch file, which I think won't be wrong:

   <param ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-05-01 08:26:03 -0500

gvdhoorn gravatar image

[..] (it passes check_urdf) [..] While when I roslaunch display.launch, things go wrong. [..]

There are various different xml parsers used in ROS, so one could be more lenient than another.

xml.parsers.expat.ExpatError: unclosed token: line 1, column 0

There seems to be something wrong with your urdf (more specifically, the xml making up your urdf) that joint_state_publisher (more specifically: expat) is not willing to ignore (but according to you, check_urdf (which uses tinxyml) apparently is).

You'll have to check the contents of zhuangpei_simplified.URDF in a text editor, and make sure it's alright.

Without access to the urdf itself, I don't think we can be of any more help.

edit flag offensive delete link more


Thank you. I thought as long as my URDF file pass check_urdf , my URDF should be right. I will check my URDF. While I thought there is nothing strange in my URDF, except the STL meshes. I will check in detail.

WYX gravatar image WYX  ( 2016-05-01 17:46:14 -0500 )edit

Question Tools

1 follower


Asked: 2016-05-01 08:04:54 -0500

Seen: 1,368 times

Last updated: May 01 '16