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 drive, and ensure the localizer you wish to use has been set for it. It is not recommended to use an alternate Accumulator while tuning. Then, treat is like a normal OpMode (TeleOp annotation). You can adjust all the constants used in testing via FtcDashboard, nested under this class definition.

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, follow the tuning guide for RoadRunner v1.0.

Author

Lucas Bubner, 2024

Since

6.0.0

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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
protected abstract fun getDrive(): RoadRunnerDrive
Instantiate hardware and return the fully configured RoadRunner drive instance to use for tuning.
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()