RoadRunnerDrive

interface RoadRunnerDrive

Interface for access methods in RoadRunner drive classes, such as MecanumDrive and TankDrive.

Author

Lucas Bubner, 2023

Since

1.0.0-pre

Inheritors

Functions

Link copied to clipboard
abstract fun cancelTrajectory()
Abort the current trajectory.
Link copied to clipboard
abstract fun followTrajectory(trajectory: Trajectory)
Follow a trajectory.
Link copied to clipboard
abstract fun followTrajectoryAsync(trajectory: Trajectory)
Follow a trajectory asynchronously.
Link copied to clipboard
abstract fun followTrajectorySequence(trajectorySequence: TrajectorySequence)
Follow a trajectory sequence.
Link copied to clipboard
abstract fun followTrajectorySequenceAsync(trajectorySequence: TrajectorySequence)
Follow a trajectory sequence asynchronously.
Link copied to clipboard
open fun getAccelerationConstraint(maxAccel: Double): TrajectoryAccelerationConstraint
Get an acceleration constraint for the drive.
Link copied to clipboard
Get the drive constants related to this drive.
Link copied to clipboard
abstract fun getExternalHeading(): Double
Link copied to clipboard
Link copied to clipboard
abstract fun getLastError(): Pose2d
Get the last reported pose error from the drive.
Link copied to clipboard
abstract fun getLocalizer(): Localizer
Link copied to clipboard
abstract fun getMotorPowers(): Array<Double>
Link copied to clipboard
abstract fun getPoseEstimate(): Pose2d
Link copied to clipboard
abstract fun getPoseVelocity(): Pose2d
Link copied to clipboard
Link copied to clipboard
Get the attached TrajectorySequenceRunner for this drive.
Link copied to clipboard
open fun getVelocityConstraint(maxVel: Double, maxAngularVel: Double, trackWidth: Double): TrajectoryVelocityConstraint
Get a velocity constraint for the drive.
Link copied to clipboard
abstract fun getWheelPositions(): List<Double>
Link copied to clipboard
abstract fun getWheelVelocities(): List<Double>
Link copied to clipboard
abstract fun isBusy(): Boolean
Link copied to clipboard
abstract fun setDrivePower(drivePower: Pose2d)
Set a drive power.
Link copied to clipboard
abstract fun setDriveSignal(driveSignal: DriveSignal)
Set a drive velocity and/or acceleration target.
Link copied to clipboard
abstract fun setExternalHeading(value: Double)
Assert the heading of the robot.
Link copied to clipboard
abstract fun setLocalizer(localizer: Localizer)
Set the new localizer to use.
Link copied to clipboard
abstract fun setMode(runMode: DcMotor.RunMode)
Set the run mode of all motors.
Link copied to clipboard
abstract fun setMotorPowers(powers: Array<Double>)
Set the motor powers for each motor on this drive.
Link copied to clipboard
abstract fun setPIDFCoefficients(runMode: DcMotor.RunMode, coefficients: PIDFCoefficients)
Set the PIDF coefficients for the drive motors.
Link copied to clipboard
abstract fun setPoseEstimate(value: Pose2d)
Assert the position of the robot.
Link copied to clipboard
abstract fun setRotationPriorityWeightedDrivePower(drivePowerRotationPriority: Pose2d)
Set a drive power with axial weights.
Link copied to clipboard
abstract fun setWeightedDrivePower(drivePower: Pose2d)
Set a drive power with axial weights.
Link copied to clipboard
abstract fun setZeroPowerBehavior(zeroPowerBehavior: DcMotor.ZeroPowerBehavior)
Set the zero power behaviour of all motors.
Link copied to clipboard
abstract fun stop()
Stop the drive immediately.
Link copied to clipboard
abstract fun trajectoryBuilder(startPose: Pose2d): TrajectoryBuilder
abstract fun trajectoryBuilder(startPose: Pose2d, reversed: Boolean): TrajectoryBuilder
abstract fun trajectoryBuilder(startPose: Pose2d, startHeading: Double): TrajectoryBuilder
Get a trajectory builder for the drive.
Link copied to clipboard
abstract fun trajectorySequenceBuilder(startPose: Pose2d): TrajectorySequenceBuilder
Get a trajectory sequence builder for the drive.
Link copied to clipboard
abstract fun turn(angle: Double)
Turn the drive.
Link copied to clipboard
abstract fun turnAsync(angle: Double)
Turn the drive asynchronously.
Link copied to clipboard
abstract fun update()
Update the drive with latest motor powers and odometry.
Link copied to clipboard
abstract fun updatePoseEstimate()
Update the pose estimate of the drive.
Link copied to clipboard
Set a remembered pose from memory in another OpMode.
Link copied to clipboard
abstract fun waitForIdle()
Run current trajectory blocking until it is complete.