TeamCode / org.firstinspires.ftc.teamcode.autonomous / AutoOpMode

AutoOpMode

open class AutoOpMode : LinearOpMode

The autonomous op mode.

The letters A-M and numbers 1-3 found in the documentation for the quick tuning variables correspond to the letters and numbers in the autonomous plan diagram.

Types

ClaimDepot

inner class ClaimDepot : State

State in which the robot uses its intake to claim the depot. (2)

EnterDepot

inner class EnterDepot : State

State in which the robot enters the depot from the depot side.

ExitDepot

inner class ExitDepot : State

State in which the robot exits the depot.

GatherVisionData

inner class GatherVisionData : State

State in which the robot gathers vision data. (1)

KnockMineralCraterSide

inner class KnockMineralCraterSide : State

State in which the robot knocks the mineral and travels to the crater from the depot side.

KnockMineralDepotSide

inner class KnockMineralDepotSide : State

State in which the robot knocks the mineral from the depot side.

Land

inner class Land : State

Work-in-progress state in which the robot lands.

MoveFromLander

inner class MoveFromLander : State

State in which the robot moves away from the lander. (A)

MoveToSideCraterSide

inner class MoveToSideCraterSide : State

State in which the robot moves to the side to prepare to travel to the depot.

ParkAtCraterCraterSide

inner class ParkAtCraterCraterSide : State

State in which the robot travels to and parks at the crater when started from the crater side.

ParkAtCraterDepotSide

inner class ParkAtCraterDepotSide : State

State in which the robot travels to and parks at the crater when started from the crater side.

State

abstract inner class State

Abstract class representing a single state/step in the AutoOpMode.

TravelToDepot

inner class TravelToDepot : State

State in which the robot travels to the depot.

TurnTowardsDepotCraterSide

inner class TurnTowardsDepotCraterSide : State

State in which the robot uses its gyro to turn towards the depot when started from the crater.

TurnTowardsDepotDepotSide

inner class TurnTowardsDepotDepotSide : State

State in which the robot uses its gyro to turn towards the depot when started from the depot.

Constructors

<init>

AutoOpMode()

The autonomous op mode.

Properties

claimDepotAngle

val claimDepotAngle: Double

Angle to which the robot should turn in order to claim the depot when started from the crater side, in degrees. (3)

claimDepotPauseTime

val claimDepotPauseTime: Int

How long the robot should pause after extending the intake, in milliseconds. (2)

drive

val drive: MecanumDrive

exitDepotTime

val exitDepotTime: Int

How long the robot exits the depot for when started from the depot side.

extake

val extake: ElevatorExtake

gyro

val gyro: Gyro

intake

val intake: ElevatorIntake

knockMineralCraterSideTime

val knockMineralCraterSideTime: Int

How long the robot should move to knock a mineral on the crater side, in milliseconds. (C)

knockMineralDepotSideTime

val knockMineralDepotSideTime: Int

How long the robot should move to knock a mineral on the depot side, in milliseconds. (B)

knockMineralReturnCraterSideTime

val knockMineralReturnCraterSideTime: Int

How long the robot should move after knocking a mineral on the crater side, in milliseconds. (C)

moveFromLanderTime

val moveFromLanderTime: Int

How long the robot should move away from the lander, in power-adjusted milliseconds. (A)

moveToDepotCraterSidePower

val moveToDepotCraterSidePower: Double

Power at which the robot moves along the side of the field towards the depot. (V)

moveToMineralCraterSideTime

val moveToMineralCraterSideTime: Int

How long the robot should move horizontally towards a mineral when started from the depot side, in milliseconds. (M)

moveToMineralDepotSideTime

val moveToMineralDepotSideTime: Int

How long the robot should move horizontally towards a mineral when started from the depot side, in milliseconds. (M)

moveToSideCraterSideTime

val moveToSideCraterSideTime: Int

How long the robot should move from the center mineral towards the side of the field before traveling to the depot, in milliseconds. (D)

parkAtCraterDepotSideTime

val parkAtCraterDepotSideTime: Int

How long the robot should move towards the crater, in milliseconds. (H)

postKnockMineralDepotSideTime

val postKnockMineralDepotSideTime: Int

How long the robot should move after knocking a mineral on the depot side, in milliseconds. (C)

rotateIntakePos

val rotateIntakePos: Int

Point to which the robot should rotate the intake. (2)

rotateIntakePower

val rotateIntakePower: Double

Power at which the robot should rotate the intake, in milliseconds. (2)

standardPower

val standardPower: Double

Standard power used when moving the robot. All millisecond values are multiplied by this value.

states

val states: LinkedList<State>

turnPower

val turnPower: Double

Power at which the robot should turn.

vision

val vision: Vision

visionTime

val visionTime: Int

How long the robot should obtain vision data for, in milliseconds. (1)

Functions

addCraterStates

open fun addCraterStates(): Unit

Adds states to be used when the robot starts on the crater side.

addDepotStates

open fun addDepotStates(): Unit

Adds states to be used when the robot starts on the depot side.

addFallbackStates

open fun addFallbackStates(): Unit

Adds states to be used in case a location cannot be determined.

run

fun run(): Unit

runOpMode

open fun runOpMode(): Unit

setup

fun setup(): Unit

Inheritors

AutoOpModeCrater

class AutoOpModeCrater : AutoOpMode

Autonomous op mode to use in case the robot cannot determine its position on the crater side.

AutoOpModeDepot

class AutoOpModeDepot : AutoOpMode

Autonomous op mode to use in case the robot cannot determine its position on the depot side.

AutoOpModeFallback

class AutoOpModeFallback : AutoOpMode

Autonomous op mode to use in case the normal one completely borks.

AutoOpModeFallbackOnCraterSide

class AutoOpModeFallbackOnCraterSide : AutoOpMode

Autonomous op mode to use in case there is a chance of collision with the other team's robot.