0
$\begingroup$

Rosanswers logo

I have a launch file that launches a URDF based model on gazebo which has flexible joints (not fixed) and launches the robot_state_publisher node. Well, I would like to control this joints through the GUI interface provided by the joint_state_publisher and for this, at first, I tried, after launching the URDF based model, the following command:

rosrun joint_state_publisher joint_state_publisher

It did not work and the retrieved error message was:

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

Although I understand the error message I do not know what to do to solve it. I do not know what should be this string.

The important of all of this is that I want to initialize the GUI interface to control the flexible joints and I do not know how to do it and any help is welcome. The solution could be via launch file also.

ps. 1: The robot description is loaded in the parameter mkz/robot_description

ps. 2: The currently launch file is:

<?xml version="1.0"?>
<launch>
  <arg name="world_file" default="$(find road_generation_gazebo)/worlds/custom.world"/>

    <!--launches URDF based model-->
    <include file="$(find vero_sim)/launch/vero_sim.launch">
        <arg name="world_file" value="$(arg world_file)"/>
    </include>

  <include file="$(find vero_sim)/launch/rviz.launch"/>
</launch>

Originally posted by Randerson on ROS Answers with karma: 236 on 2017-12-06

Post score: 0


Original comments

Comment by jayess on 2017-12-06:
Can you please update your question with the entire error and entire launch file? What do you mean by

the param robot_description is mapped to mkz/robot/description

?

Comment by jayess on 2017-12-06:
I believe @David Lu's answer is correct. It's not able to find the robot_description because it's currently located at mkz/robot/description/. Also, this updated launch file doesn't even show a joint_state_publisher so is this the correct/full launch file?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Try rosrun joint_state_publisher joint_state_publisher robot_description:=mkz/robot/description


Originally posted by David Lu with karma: 10932 on 2017-12-06

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

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