RobotTracker

object RobotTracker : API

An API to track the current coordinates of the robot.

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 val isLinear: Boolean = false

Defines whether this API requires features from LinearOpMode.

Link copied to clipboard
lateinit var pinpoint: GoBildaPinpointDriver
Link copied to clipboard
lateinit var pose2D: Pose2D
Link copied to clipboard
lateinit var tracker: SparkFunOTOS

Functions

Link copied to clipboard
fun autoInit(opMode: OpMode)

Used for Initialization of RobotTracker during Autonomous. Does not initialize tracker.

Link copied to clipboard
Link copied to clipboard

ONLY WORKS IN AUTO Gets the current acceleration as an Array of Doubles, 0 = Horizontal, 1 = Vertical, 2 = Radial

Link copied to clipboard
fun getPos(isAuto: Boolean): DoubleArray

Returns the position as an Array of Doubles, 0 = x, 1 = y, 2 = h

Link copied to clipboard

Gets the current velocity as an Array of Doubles, 0 = Horizontal, 1 = Vertical, 2 = Angular

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

Initializes this API.

Link copied to clipboard
fun setPos(newX: Double, newY: Double, newH: Double, isAuto: Boolean)

Sets the current position.

Link copied to clipboard
fun teleInit(opMode: OpMode)

Used for Initialization of RobotTracker during TeleOp.

Link copied to clipboard
fun updatePos()

Updates the deadwheel position of the robot