SpecterDrive

object SpecterDrive : API

An API for our Autonomous Pathing, initializes auto RobotTracking

Properties

Link copied to clipboard
open val dependencies: Set<API>

Configures all APIs that must be initialized in order to use this API.

Link copied to clipboard

Returns true if init has been called for this opmode.

Link copied to clipboard
open override val isLinear: Boolean = true

Defines whether this API requires features from LinearOpMode.

Link copied to clipboard
Link copied to clipboard
lateinit var otos: SparkFunOTOS

Functions

Link copied to clipboard
fun followPurePursuit(pursuit: PurePursuit, timeout: Double = 10.0)

Follows a PurePursuit path

Link copied to clipboard
open override fun init(opMode: OpMode)

Initializes this API.

Link copied to clipboard
fun path(pose: DoubleArray, h: Double, t: Double = 999.99999, rC: Boolean = true)
fun path(x: Double, y: Double, h: Double, t: Double = 999.99999, rC: Boolean = true, spMag: Double = 0.0)

Computes a direct path towards a robot-centric position

Link copied to clipboard
fun rotateToHeading(targetAngle: Double, power: Double = 0.3, timeout: Double = 3.0)

Rotates to a specific global heading on the field.

Link copied to clipboard
fun setPose(x: Double, y: Double, h: Double)

Updates the OTOS internal position to match field coordinates.