RoadRunnerTuningOpMode

abstract class RoadRunnerTuningOpMode : LinearOpMode

Utility OpMode you will extend to enable an OpMode to tune your RoadRunner coefficients and parameters. This uses Telemetry to show a menu of tuning options, with static fields being adjusted here, essentially collecting all RoadRunner tuning into one OpMode. You may choose to run the OpModes yourself as they consume the instances you provide, but using this class makes it more straightforward and has built-in dashboard tuning. It is not recommended you run the tuning OpModes yourself, and instead run them using this class.

To use this class, extend it, supply an appropriately configured instance of your base RoadRunnerDrive (not the BunyipsLib version), and ensure the localizer you wish to use has been set for it. Then, treat is like a normal OpMode (TeleOp annotation). You can adjust all the constants used in testing via FtcDashboard under RoadRunnerTuning.

Telemetry is mirrored between FtcDashboard and the Driver Station using a DualTelemetry instance, the same used in BunyipsOpMode. It is not required that a Driver Station be active for tuning.

To look at details of a tuning process, you can find them attached to the classes under the ./opmodes package, and by applying the tuning process for RoadRunner v0.5.

Author

Lucas Bubner, 2024

Since

4.0.0

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Feedforward coefficient automated calculation to get a general idea of the FF coefficients, not fully accurate.
Link copied to clipboard
Follower PID test (moves forward and backward forever).
Link copied to clipboard
PID tuner for velocity mode (note: not recommended to use velocity PID).
Link copied to clipboard
Follower PID test (moves in a square forever).
Link copied to clipboard
General drive capabilities, to test field localization and odometry pod tracking.
Link copied to clipboard
Most important tuning procedure to tune precise feedforward coefficients.
Link copied to clipboard
Determines maximum angular velocity of the robot.
Link copied to clipboard
Determines maximum velocity of the robot.
Link copied to clipboard
Debug mode to determine which motors on a four-wheel setup are attached where.
Link copied to clipboard
Final test of coefficients with an advanced spline path.
Link copied to clipboard
Strafing test to verify y direction localization.
Link copied to clipboard
Forward test to verify x direction localization.
Link copied to clipboard
For three-wheel odometry, tuner to find the forward offset coefficient.
Link copied to clipboard
For three-wheel odometry, tuner to find the lateral offset coefficient.
Link copied to clipboard
Tuner to find the effective track width coefficient.
Link copied to clipboard
open var TurnTest: TurnTest
Rotation test to verify z-axis localization.

Inherited properties

Link copied to clipboard
open var gamepad1: Gamepad
Link copied to clipboard
open var gamepad2: Gamepad
Link copied to clipboard
open var hardwareMap: HardwareMap
Link copied to clipboard
open val isStarted: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var telemetry: Telemetry
Link copied to clipboard
open var time: Double

Functions

Link copied to clipboard
Link copied to clipboard
fun runOpMode()

Inherited functions

Link copied to clipboard
open fun getRuntime(): Double
Link copied to clipboard
fun idle()
Link copied to clipboard
fun init()
Link copied to clipboard
fun init_loop()
Link copied to clipboard
Link copied to clipboard
open fun internalPostLoop()
Link copied to clipboard
open fun internalPreInit()
Link copied to clipboard
fun internalUpdateTelemetryNow(telemetry: TelemetryMessage)
Link copied to clipboard
Link copied to clipboard
fun loop()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun resetRuntime()
Link copied to clipboard
fun sleep(milliseconds: Long)
Link copied to clipboard
fun start()
Link copied to clipboard
fun stop()
Link copied to clipboard
Link copied to clipboard
open fun updateTelemetry(telemetry: Telemetry)
Link copied to clipboard
open fun waitForStart()