Ask Your Question
1

joint state publisher's zeros parameter

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

TkrA gravatar image

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

Hello!

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:

zeros:
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
3

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

gvdhoorn gravatar image

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

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).

zeros:
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):

zeros:
  joint1: 0.5
  joint2: 0.6

in-line in launch file:

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

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

edit flag offensive delete link more

Comments

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 imageTkrA ( 2015-05-29 07:18:29 -0600 )edit
VictorLamoine gravatar imageVictorLamoine ( 2018-12-13 07:39:42 -0600 )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-05-29 04:59:17 -0600

Seen: 465 times

Last updated: May 29 '15