Automatic Tuning
Automatically measure robot velocities and accelerations for optimal performance
Velocity Tuners
Measure maximum forward and lateral velocities at full power
Zero-Power Acceleration
Measure natural deceleration when power is cut for better path following
Why Automatic Tuning?
These values are crucial for accurate path following. The automatic tuners measure your robot's actual performance rather than relying on theoretical calculations.
Forward Velocity Tuner
Measures your robot's maximum forward velocity at full power. Critical for feedforward control.
How It Works:
- Robot drives forward at full power
- Measures velocity over the last 48 inches
- Averages the last 10 velocity readings
- Displays the maximum forward velocity
Running the Tuner:
Update RobotConfig:
.xVelocity(52.3) // Replace with your measured valueTypical values: 45-60 in/s depending on motors and battery
Lateral Velocity Tuner
Measures maximum lateral (strafe) velocity. Usually lower than forward velocity due to mecanum wheel friction.
Running the Tuner:
.yVelocity(48.5) // Replace with your measured valueNote: Lateral velocity is typically 85-95% of forward velocity
Zero-Power Acceleration
Measures how quickly your robot naturally decelerates when power is cut. This helps the follower predict braking distances and stop precisely at path endpoints.
Forward Zero-Power Acceleration
Measures forward deceleration when coasting.
.forwardZeroPowerAcceleration(-38.2) // Typical: -30 to -50Lateral Zero-Power Acceleration
Measures lateral deceleration when coasting.
.lateralZeroPowerAcceleration(-42.1) // Typical: -35 to -55Important Tips
💡 Always Use Full Battery
Battery voltage significantly affects velocity. Always tune with a fully charged battery and use the same battery level during competitions.
💡 Run Multiple Trials
Run each tuner 3 times and average the results. This accounts for variations in motor performance and floor surface.
💡 Re-tune After Changes
Re-run tuners if you change motors, wheels, battery, or robot weight. These all affect velocity and acceleration.
💡 Press A to Apply Values
After each tuner finishes, press A on gamepad to temporarily apply values (until robot restarts). This lets you test without redeploying code.
Complete RobotConfig Example
public static MecanumConstants driveConstants = new MecanumConstants()
.maxPower(1.0)
// ... motor names and directions ...
.xVelocity(52.3) // From Forward Velocity Tuner
.yVelocity(48.5); // From Lateral Velocity Tuner
public static FollowerConstants followerConstants = new FollowerConstants()
.mass(10.0)
.forwardZeroPowerAcceleration(-38.2) // From Forward ZPA Tuner
.lateralZeroPowerAcceleration(-42.1) // From Lateral ZPA Tuner
// ... PID coefficients ...Next Steps
With velocity and acceleration values tuned, you're ready to tune PID controllers!
Tune PID Controllers →