Hi Andreas, Since the PR2 accepts force/torque commands, the Gazebo simulation of the PR2 also accepts only force/torque commands. The pid part of the yaml configuration is our preferred way of specifying PID gains to the controller. It is up to the controller to parse the pid parameters and to make use of them in its update loop, but it can rely on other objects for assistance (in most cases, the Pid class in control_toolbox: http://www.ros.org/doc/api/control_toolbox/html/classcontrol__toolbox_1_1Pid.html ). For a simple example of how to use PID feedback to command positions, see the JointPositionController: http://code.ros.org/svn/wg-ros-pkg/stacks/pr2_controllers/tags/pr2_controllers-1.0.2/robot_mechanism_controllers/include/robot_mechanism_controllers/joint_position_controller.h http://code.ros.org/svn/wg-ros-pkg/stacks/pr2_controllers/tags/pr2_controllers-1.0.2/robot_mechanism_controllers/src/joint_position_controller.cpp Regards, -Stu On Fri, May 7, 2010 at 4:45 AM, Andreas Vogt wrote: > Hi, > > Can I control my joints only with forces/torques or is there any > possibility to control the position? > Why is there a PID Controller in the yaml available if I must implement > a kind of force controller in the update() method? > > YAML: >  my_controller_ns: >    type: MyControllerPlugin >    wheel1: joint_c-w1 >  pid: >    p: 10.0 >    i: 0.0 >    d: 0.0 >    i_clamp: 1 > > void MyControllerClass::update(){ > >    double desired_pos = init_pos_ + amplitude_ * > sin(ros::Time::now().toSec()); >     double current_pos = joint_state_->position_; >     joint_state_->commanded_effort_ = -10 * (current_pos - desired_pos); > > } > > -- > >  Andreas Vogt >  Logistics and Production Robotics > >  DFKI Bremen >  Robotics Innovation Center >  Robert-Hooke-Straße 5 >  28359 Bremen, Germany > >  Phone: +49 (0)421 218-64140 >  Fax:   +49 (0)421 218-64150 >  E-Mail: andreas.vogt@dfki.de > >  Weitere Informationen: http://www.dfki.de/robotik >  ----------------------------------------------------------------------- >  Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH >  Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern >  Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster >  (Vorsitzender) Dr. Walter Olthoff >  Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes >  Amtsgericht Kaiserslautern, HRB 2313 >  Sitz der Gesellschaft: Kaiserslautern (HRB 2313) >  USt-Id.Nr.:    DE 148646973 >  Steuernummer:  19/673/0060/3 > > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > -- Stuart Glaser sglaser -at- willowgarage -dot- com www.willowgarage.com