Centripetal
Tuning the centripetal scaling
Purpose
The centripetal force correction enables the robot to accurately follow curved paths.
Setup
- Open Panels. If you haven't used Panels before, you can read the documentation on Panels Configurables.
- On your Driver Hub or Driver Station, select the
TuningOpmode, navigate toManualand then chooseCentripetalTuner. - Ensure that the timer for autonomous OpModes is disabled. Otherwise, the OpMode will automatically stop after 30 seconds.
- Run the run the
CentripetalTunerautonomous OpMode.
Warning!
- Immediately after running the
Centripetal TunerOpmode, the robot will move forward and left 20 inches in a curved path. Make sure you have enough space before running this opmode. - You can adjust the distance the robot drives back and forth through Panels.
Tuning Process
Follow this video to help you tune the centripetal scalar:
Observe the robot’s path:
- If the robot corrects towards the inside of the curve, decrease
centripetalScaling. - If the robot corrects towards the outside of the curve, increase
centripetalScaling. Adjust the value ofcentripetalScalingwithin theTuning->Follower->Constantssection in Panels.
Update Tuned values Into Your Code
- Once you are satisfied with your
centripetalScaling, head over to theConstantsfile. - Navigate to the line
.centripetalScaling(0.005)underfollowerConstants. If you don't have this line, feel free to add it yourself. - Update the parameters in
.centripetalScaling(0.005)with thecentripetalScalingvalue you tuned.
Troubleshooting
If you have any problems, see the troubleshooting page.
Last updated on

