Ask Your Question
0

Error while running joint_state_publisher

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

Sphenops gravatar image

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

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>
</node>`

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/minidom.py", line 1930, 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: 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
0

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

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

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)

https://github.com/Hacks4ROS/h4r_rapi...

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

Comments

Hi Cyborb, Thanks for the reply. I missed to add the model: <param name="robot_description" command= "$(find xacro)/xacro.py $(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 -0500 )edit

You're welcome ;-)

cyborg-x1 gravatar image cyborg-x1  ( 2015-07-23 08:58:49 -0500 )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 -0500 )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 https://github.com/ros/robot_model/bl...

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

How did you fix the namespace issue?

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

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

lucasw gravatar image

Try:

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

Comments

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

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

No source_list one is a rosparam, it only has one item here but can be multiple. http://moveit.ros.org/wiki/Rviz_Plugi... 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 -0500 )edit

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

cyborg-x1 gravatar image cyborg-x1  ( 2015-07-22 14:30:08 -0500 )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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 3,044 times

Last updated: Jul 23 '15