Why?
Single-jointed arm
Click or drag to move the goalPosition vs time
Motor output
Last step response
Since the goal last changed- Rise time 10–90%
- –
- Overshoot
- –
- Settling time ±2%
- –
- Error now
- –
- Bump recovery
- –
Software · Controls
Tune a simulated robot arm one gain at a time, the way we tune real mechanisms.
Feedforward doesn't wait for error. kG holds the mechanism up against gravity. kS overcomes friction in the direction of the error. On our robots that is kS in the gain slot with StaticFeedforwardSign = UseClosedLoopSign, like the 2026 shooter hood. kV supplies the voltage a moving setpoint needs, so on the arm and elevator it only matters with the motion profile on. Feed Forward Control explains each term.
With good feedforward, many FRC mechanisms only need kP. kI can remove a small leftover error, but it builds up during long moves and causes overshoot. kD damps overshoot when kP alone rings. See PID Controllers.
A trapezoid motion profile moves the setpoint smoothly toward the goal with a speed and acceleration limit. On an MW-Lib mechanism that is calling setTargetPositionMotionProfile(...) instead of setTargetPosition(...). Turn it on under More controls in Free play.
The controller runs every 20 ms like a roboRIO loop. The physics runs every 1 ms.