joint_state_publisher fails to launch: TypeError

asked 2018-02-18 13:14:24 -0600

KBradner gravatar image

I am trying to run the joint state publisher node, but have not been able to launch it.

My original goal was to run the launch file:

<launch>
    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
        <rosparam param="source_list">["/robot/joint_states"]</rosparam>
    </node>
</launch>

I have also tried running the following command:

rosrun joint_state_publisher joint_state_publisher

In both cases, I get the following error:

Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/joint_state_publisher/joint_state_publisher", line 432, in <module>
    jsp = JointStatePublisher()
  File "/opt/ros/kinetic/lib/joint_state_publisher/joint_state_publisher", line 45, 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)
TypeError: Parse() argument 1 must be string or read-only buffer, not None

I also tried a command suggested by user jarvisschultz ona previous question I had:

rosrun joint_state_publisher joint_state_publisher _source_list:="['/robot/joint_states']"

This produces the same error again.

I'm running ros Kinetic on Ubuntu 16.04. Please let me know if I can provide any other info and I'll be happy to do so.

edit retag flag offensive close merge delete

Comments

It shouldn't fail like this, but do you have robot_description set? And if you do, is it perhaps empty?

gvdhoorn gravatar imagegvdhoorn ( 2018-02-18 14:22:41 -0600 )edit