0
$\begingroup$

Rosanswers logo

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?


Originally posted by Sphenops on ROS Answers with karma: 5 on 2015-07-22

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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_rapid_robot_xacros/blob/develop/launch/diff_drive_bot.launch

Btw, are you sure your model is there?

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


Originally posted by cyborg-x1 with karma: 1376 on 2015-07-23

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Sphenops on 2015-07-23:
Hi Cyborb, Thanks for the reply. I missed to add the model: `

` Thanks a lot.

Comment by cyborg-x1 on 2015-07-23:
You're welcome ;-)

Comment by lucasw on 2016-04-05:
I just got this error when I was running joint_state_publisher in a different namespace than the one where the robot_description resides.

Comment by lucasw on 2016-04-05:
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/blob/kinetic-devel/joint_state_publisher/joint_state_publisher/joint_state_publisher#L14

Comment by tanasis on 2017-11-07:
How did you fix the namespace issue?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.