Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why is the command of the PID class defined as the negative summation of the gains?

In reference to this: https://github.com/arpg/Gazebo/blob/master/gazebo/common/PID.cc

The command of the PID controller is defined as follows:

this->cmd = -pTerm - iTerm - dTerm;

Instead of

this->cmd = pTerm + iTerm + dTerm;

I assume it takes the error as e = current_value - desired_value, but why does it seem to go against the convention which is e = desired_value - current_value?