RoadRunner

interface RoadRunner

RoadRunner utility interface for OpModes, providing simpler trajectory building processes. Do not override any of the default methods in this interface, as they are used for RoadRunner task scheduling.

Previously named RoadRunnerAutonomousBunyipsOpMode (RRABOM, nickname "Rabone").

This interface can be used in any OpMode base variant, however the addTask() builder method requires the presence of AutonomousBunyipsOpMode.

Author

Lucas Bubner, 2024

Since

1.0.0-pre

See also

Types

Link copied to clipboard
Priority representation for building tasks.
Link copied to clipboard
Builder class for a trajectory and task sequence.

Properties

Link copied to clipboard
The timeout value used for the RoadRunner drive update watchdog to disengage the drive if an update call has not been registered after this timeout.
Link copied to clipboard
Whether timeouts for built tasks should be force-set to no timeout.
Link copied to clipboard
val splicedPose: Reference<Pose2d>
Stores last spliced pose.

Functions

Link copied to clipboard
open fun atAcceleration(acceleration: Double, unit: Velocity<Velocity<Distance>>): TrajectoryAccelerationConstraint
Make a translation acceleration constraint.
Link copied to clipboard
open fun atAngularVelocity(rotation: Double, unit: Velocity<Angle>): TrajectoryVelocityConstraint
Make an angular velocity constraint.
Link copied to clipboard
open fun atVelocities(translation: Double, translationUnit: Velocity<Distance>, rotation: Double, rotationUnit: Velocity<Angle>): TrajectoryVelocityConstraint
Make a translation and angular velocity constraint.
Link copied to clipboard
open fun atVelocity(translation: Double, unit: Velocity<Distance>): TrajectoryVelocityConstraint
Make a translation velocity constraint.
Link copied to clipboard
Get the drive instance reference to be used for RoadRunner trajectories.
Link copied to clipboard
open fun makeTrajectory(startPoseInchRad: Pose2d, mirrorPoseRef: Boolean): RoadRunner.RoadRunnerTrajectoryTaskBuilder
open fun makeTrajectory(startPose: Pose2d, inUnit: Distance, angleUnit: Angle): RoadRunner.RoadRunnerTrajectoryTaskBuilder
open fun makeTrajectory(startPose: Pose2d, inUnit: Distance, angleUnit: Angle, mirrorPoseRef: Boolean): RoadRunner.RoadRunnerTrajectoryTaskBuilder
Use this method to build a new RoadRunner trajectory or to add a RoadRunner trajectory to the task queue.
Link copied to clipboard
open fun mirror(pose: Pose2d): Pose2d
Mirror a global pose across the alliance plane.
open fun mirror(vector: Vector2d): Vector2d
Mirror a global vector across the alliance plane.
Link copied to clipboard
open fun resetForOpMode()
Reset fields for an OpMode.
Link copied to clipboard
open fun resetPoseInfo()
Reset pose info back to default.
Link copied to clipboard
open fun setPose(poseEstimateInchRad: Pose2d)
open fun setPose(poseEstimate: Pose2d, inUnit: Distance, angleUnit: Angle)
Set the current pose estimate of the drive.
Link copied to clipboard
open fun unitPose(pose: Pose2d, distanceUnit: Distance, angleUnit: Angle): Pose2d
open fun unitPose(pose: Pose2d, distanceUnit: Distance, angleUnit: Angle, scalarDistMult: Double): Pose2d
Convert a Pose2d of specified units to inches and radians.
Link copied to clipboard
open fun unitVec(vector: Vector2d, unit: Distance): Vector2d
open fun unitVec(vector: Vector2d, unit: Distance, scalarDistMult: Double): Vector2d
Convert a Vector2d of specified units to inches and radians.