Ask Your Question

joint state publisher's zeros parameter

asked 2015-05-29 04:59:17 -0500

TkrA gravatar image

updated 2015-05-29 05:00:24 -0500


Could somebody please provide me a correct yaml file for ros joint state publisher's zeros parameter?

In the description of joint_state_publisher it is written:

zeros (Dict mapping Strings to Floats, default: {})

Dictionary to specify some joints' 'zero position' (since hydro)

I thought of something like this, but it's not working:

joint1: {0.5}
joint2: {0.6}

Here you have the joint state publisher's code

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-29 06:56:10 -0500

gvdhoorn gravatar image

updated 2015-05-29 08:09:57 -0500

Two ways to get a dictionary (key, value) on the ROS parameter server: loading a correctly formatted yaml file, or in-line in a rosparam for the node (in this case, joint_state_publisher).

joint1: {0.5}
joint2: {0.6}

If that is the actual formatting, then that won't work in either case. The whole zeros parameter should be a dictionary, not its individual elements (which you are doing by adding the curly braces ({, }).

In a yaml (note indentation):

  joint1: 0.5
  joint2: 0.6

in-line in launch file:

<node type="joint_state_publisher" ..>
      joint1: 0.5
      joint2: 0.6

In both cases indentation is required for the parser to create a proper dictionary out of the yaml.

edit flag offensive delete link more


Ok, thanks! It is working, i used <rosparam file="$(find torobot_moveit_config_new)/config/zeros.yaml"/> to load it in my launchfile.

TkrA gravatar image TkrA  ( 2015-05-29 07:18:29 -0500 )edit
VictorLamoine gravatar image VictorLamoine  ( 2018-12-13 07:39:42 -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


Asked: 2015-05-29 04:59:17 -0500

Seen: 842 times

Last updated: May 29 '15