acmerobotics / road-runner

Wheeled mobile robot motion planning library designed for FTC
MIT License
209 stars 75 forks source link

Fix incorrect d output when measuredVelocity is provided #61

Closed henopied closed 3 years ago

henopied commented 3 years ago

When measuredVelocity is provided, the PID controller applies the velocity feedback incorrectly. This pull request fixes the backwards d term feedback when measuredVelocity is provided.

rbrott commented 3 years ago

Oh I actually just finished this locally (see this card), but let() seems more idiomatic than appending ?.unaryMinus().