Skip to content

Commit

Permalink
Merge pull request ros-controls#39 from clearpathrobotics/fix-math
Browse files Browse the repository at this point in the history
Update computeCommand call to match documented/expected behaviour
  • Loading branch information
Adolfo Rodriguez Tsouroukdissian committed May 22, 2015
2 parents 3789597 + 290d4c4 commit 3de74ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ double Pid::computeCommand(double error, double error_dot, ros::Duration dt)
d_term = gains.d_gain_ * d_error_;

// Compute the command
cmd_ = - p_term - i_term - d_term;
cmd_ = p_term + i_term + d_term;

return cmd_;
}
Expand Down

0 comments on commit 3de74ba

Please sign in to comment.