Skip to content

Commit 3de74ba

Browse files
author
Adolfo Rodriguez Tsouroukdissian
committed
Merge pull request #39 from clearpathrobotics/fix-math
Update computeCommand call to match documented/expected behaviour
2 parents 3789597 + 290d4c4 commit 3de74ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ double Pid::computeCommand(double error, double error_dot, ros::Duration dt)
369369
d_term = gains.d_gain_ * d_error_;
370370

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

374374
return cmd_;
375375
}

0 commit comments

Comments
 (0)