Skip to content

Commit

Permalink
Correct documentation (signs in PID control law) (#138)
Browse files Browse the repository at this point in the history
Co-authored-by: Bence Magyar <[email protected]>
  • Loading branch information
christophfroehlich and bmagyar authored Jan 15, 2023
1 parent 15ac3e6 commit 9585691
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/control_toolbox/pid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace control_toolbox
In particular, this class implements the standard
pid equation:
\f$command = -p_{term} - i_{term} - d_{term} \f$
\f$command = p_{term} + i_{term} + d_{term} \f$
where: <br>
<UL TYPE="none">
Expand All @@ -72,7 +72,7 @@ namespace control_toolbox
given:<br>
<UL TYPE="none">
<LI> \f$ p_{error} = p_{state} - p_{target} \f$.
<LI> \f$ p_{error} = p_{desired} - p_{state} \f$.
</UL>
\param p Proportional gain
Expand All @@ -97,7 +97,7 @@ namespace control_toolbox
ros::Time last_time = ros::Time::now();
while (true) {
ros::Time time = ros::Time::now();
double effort = pid.updatePid(currentPosition() - position_desi_, time - last_time);
double effort = pid.updatePid(position_desi_ - currentPosition(), time - last_time);
last_time = time;
}
\endverbatim
Expand Down

0 comments on commit 9585691

Please sign in to comment.