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

Error while running joint_state_publisher

asked 2015-07-22 08:47:26 -0600

Sphenops gravatar image

updated 2015-07-22 09:01:30 -0600

gvdhoorn gravatar image

Hi, I have been trying to bring up the joint state publisher through the launch file using the below command:

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" output="screen">
   <rosparam param="source_list">[joint_states]</rosparam>
   <rosparam param="use_gui">FALSE</rosparam>

I get the following error:

Traceback (most recent call last):

File "/opt/ros/hydro/lib/joint_state_publisher/joint_state_publisher", line 327, in <module>
    jsp = JointStatePublisher()

File "/opt/ros/hydro/lib/joint_state_publisher/joint_state_publisher", line 25, in __init__

robot = xml.dom.minidom.parseString(description).getElementsByTagName('robot')[0]

File "/usr/lib/python2.7/xml/dom/", line 1930, 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)

TypeError: must be string or read-only buffer, not None

[joint_state_publisher-7] process has died [pid 6443, exit code 1, cmd /opt/ros/hydro/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/asimov3/.ros/log/474b6a1a-3077-11e5-9d8c-e8de270f798c/joint_state_publisher-7.log].
log file: /home/asimov3/.ros/log/474b6a1a-3077-11e5-9d8c-e8de270f798c/joint_state_publisher-7*.log

Could anyone please clarify why this error is thrown?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-07-23 03:29:54 -0600

updated 2015-07-23 04:12:38 -0600

Ehm, I guess we should take a closer look at this line:

robot = xml.dom.minidom.parseString(description).getElementsByTagName('robot')[0]

Maybe you should try another launchfile with a Joint state publisher, could be something wrong with your model (missing, or malformed robot tag).

You could also try my package: I have a robot in there ... robot state should work (it does for me with ros indigo on Ubuntu Trusty 64 Bits) (btw. my rviz file is a bit messed up)

Btw, are you sure your model is there?

I just tried what happpens when the robot model is not there -> joint state publisher crashes.

edit flag offensive delete link more


Hi Cyborb, Thanks for the reply. I missed to add the model: <param name="robot_description" command= "$(find xacro)/ $(find h4r_rapid_robot_xacros)/def/test_robots/diff_drive_bot.xacro" /> Thanks a lot.

Sphenops gravatar image Sphenops  ( 2015-07-23 08:50:27 -0600 )edit

You're welcome ;-)

cyborg-x1 gravatar image cyborg-x1  ( 2015-07-23 08:58:49 -0600 )edit

I just got this error when I was running joint_state_publisher in a different namespace than the one where the robot_description resides.

lucasw gravatar image lucasw  ( 2016-04-05 13:57:05 -0600 )edit

There is something a little irregular (or not?) where joint_state_publisher looks for every parameter in the private namespace first, and then the public

lucasw gravatar image lucasw  ( 2016-04-05 13:57:40 -0600 )edit

How did you fix the namespace issue?

tanasis gravatar image tanasis  ( 2017-11-07 06:14:32 -0600 )edit

answered 2015-07-22 12:09:49 -0600

lucasw gravatar image


<param name="use_gui" value="false" />
edit flag offensive delete link more


and <param name="source_list" value="[joint_states]" /> as well

cyborg-x1 gravatar image cyborg-x1  ( 2015-07-22 12:13:27 -0600 )edit

No source_list one is a rosparam, it only has one item here but can be multiple. has an example though it has /use_gui instead of use_gui, I think wrongly unless the node happens to be on /.

lucasw gravatar image lucasw  ( 2015-07-22 13:22:07 -0600 )edit

ok never saw that something was inside the tags for params.

cyborg-x1 gravatar image cyborg-x1  ( 2015-07-22 14:30:08 -0600 )edit

Thanks for replying. I tried changing the parameters. The error still exists. Also I tried removing the tags altogether and only have joint_state_publisher node launched. Doubt that the the error pops up even before the tags are checked.

Sphenops gravatar image Sphenops  ( 2015-07-22 23:31:45 -0600 )edit

Question Tools

1 follower


Asked: 2015-07-22 08:47:26 -0600

Seen: 3,625 times

Last updated: Jul 23 '15