Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you have a doubt because the documentation isn't precise enough, just check the code directly on Bitbucket:

https://bitbucket.org/osrf/gazebo/src/7081a5b47d14fc6f1fa6a191ada381483f92460a/gazebo/physics/JointController.hh?at=default&fileviewer=file-view-default

For position PIDs, here is how it uses the common::PID class and the SetForce() function:

double cmd = this->dataPtr->posPids[iter->first].Update(this->dataPtr->joints[iter->first]->GetAngle(0).Radian() -  iter->second, stepTime);
this->dataPtr->joints[iter->first]->SetForce(0, cmd);