Rosanswers logo

i was following this tutorial : http://gazebosim.org/tutorials/?tut=ros_control to create a .yaml config file in order to control my robot's joints, so that did work for me but i want to create just one controller to controll many joints.

i wrote this code but the controllers didn't want to be load :


type: effort_controllers/JointPositionController

joints: joint1




pid: {p: 100.0, i: 0.01, d: 10.0}

any suggestions?

Originally posted by samo on ROS Answers with karma: 11 on 2018-06-27

Post score: 0

Original comments

Comment by chrissunny94 on 2018-06-28:
Do you mean , how to control the joints ?

There are two ways , Publish from CLI

or Use rqt_reconfigure

Comment by samo on 2018-06-28:
Thank you. yeah, i used rqt_gui in order to control the joints and that worked for me, but i want to declare just one controller, so when i want to publish from a node i can use just one topic to publish in all my joints.

did you understand me? if there is any question i'm listenning.

Comment by mgruhler on 2018-06-29:
@samo please stop bumping your question. If someone can answer, he/she will probably have done so...

Comment by samo on 2018-06-29:
@mgruhler got it, and sorry


1 Answer 1


Rosanswers logo

This is not possible with the effort_controllers/JointPositionController. This is intended for a single joint.

However, there is also an effort_controllers/JointGroupPositionController. I don't have personal experience, but this might do what you want.

Syntax for the yaml is (according to this example) :

type: "position_controllers/JointGroupPositionController"
 - joint_1
 - joint_2
  joint_1: {p: 100.0, i: 0.01, d: 10.0}
  joint_2: {p: 100.0, i: 0.01, d: 10.0}

Originally posted by mgruhler with karma: 12390 on 2018-06-29

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by samo on 2018-07-06:
thanks, i tried what you told me here but it gives me an error "load_parameters: unable to set parameters (last param was [/pid_gains/elbow/i=1]): cannot marshal None unless allow_none is enabled"

Comment by samo on 2018-07-06:
do you know what kind of error is this, and how to solve it?

Comment by mgruhler on 2018-07-06:
see e.g. #q165686


Your Answer

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