Ask Your Question
0

How performe rosrun on joint_state_publisher

asked 2017-12-06 12:33:02 -0500

Randerson gravatar image

updated 2017-12-06 13:13:31 -0500

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>
edit retag flag offensive close merge delete

Comments

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

?

jayess gravatar image jayess  ( 2017-12-06 12:58:22 -0500 )edit

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?

jayess gravatar image jayess  ( 2017-12-06 13:21:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-12-06 13:03:56 -0500

David Lu gravatar image

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

edit flag offensive delete link more

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: 2017-12-06 12:33:02 -0500

Seen: 504 times

Last updated: Dec 06 '17