ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

gazebo ros pid plugin

asked 2011-12-12 08:44:14 -0500

Markus Bader gravatar image

updated 2014-04-20 14:09:41 -0500

ngrennan gravatar image


I am looking for a gazebo ros plugin to simulate pid position control. I found a GazeboRosForce but nothing to rotate or move a joint to a certain position.

Any ideas?

Greetings Max

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-12-13 00:52:13 -0500

DimitriProsser gravatar image

This is how I've always seen it done. You could write a Gazebo plugin, but you could also run a node like this instead, without having to write any new code at all. Running this controller outside of Gazebo will basically subscribe to the joint's positions and then issue corrective commands to force the joint to follow the PID. Whether it's running in a separate node or as a plugin to Gazebo, it's really all the same in terms of functionality.

edit flag offensive delete link more


Good idea thanks, I will try the control_toolbox, If I have the time I will write a gazebo plugin, because a note runs as a separate process while a gazebo plugin will run within the gazebo loop. Therefore you can not assure real-time "as far as you can speak of real-time with a simulator"
Markus Bader gravatar image Markus Bader  ( 2011-12-13 01:26:30 -0500 )edit

answered 2011-12-12 18:49:52 -0500

Adolfo Rodriguez T gravatar image


Do you require it being a gazebo plugin?. If you can settle for a controller implementing the pr2_controller_interface, the JointPositionController class implements a single-joint PID position controller. Also, some time ago I extended the JointPositionController to a group of joints for convenience reasons (code, not tested extensively). A word of caution: In these implementations updating the reference signal is non-realtime (plain ROS topic).

edit flag offensive delete link more


Thank you, But I am looking for a gazebo plugin! I don't think it makes much sense to use a ROS note, it has to run within gazebo to simulate a pid controller.
Markus Bader gravatar image Markus Bader  ( 2011-12-13 00:39:23 -0500 )edit

Question Tools



Asked: 2011-12-12 08:44:14 -0500

Seen: 1,478 times

Last updated: Dec 13 '11