error met in joint_state_publisher when using rviz to read URDF file
I want to use rviz to visualize my URDF model (it passes checkurdf) 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 `jointstate_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/
SUMMARY
PARAMETERS
* /robot_description: <?xml version="1....
* /rosdistro: indigo
* /rosversion: 1.11.19
* /use_gui: True
NODES
/
joint_state_publisher (joint_state_publisher/joint_state_publisher)
robot_state_publisher (robot_state_publisher/state_publisher)
rviz (rviz/rviz)
ROS_MASTER_URI=http://localhost:11311
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/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", 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:
/home/yx/.ros/log/8239943a-0f92-11e6-bfff-000c29b98697/joint_state_publisher-1*.log
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 0.0.0.0:0
[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:
<launch>
<param name="robot_description" textfile="/home/yx/Desktop/halobject/src/halobject/robots/zhuangpei_simplified.URDF" />
<arg name="gui" default="False" />
<param name="use_gui" value="$(arg gui)"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" ></node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" />
</launch>
Asked by WYX on 2016-05-01 08:04:54 UTC
Answers
.. [..] 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.
Asked by gvdhoorn on 2016-05-01 08:26:03 UTC
Comments
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.
Asked by WYX on 2016-05-01 17:46:14 UTC
Comments