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
?
Asked by bhej on 2019-07-29 15:06:16 UTC
Comments