Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct documentation (signs in PID control law) #138

Merged
merged 2 commits into from
Jan 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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