Position

data class Position(val alliance: StartingConfiguration.Alliance, val origin: StartingConfiguration.Origin, val backwardTranslation: Measure<Distance>, val horizontalTranslation: Measure<Distance>, val ccwRotation: Measure<Angle>)

Represents a position that a robot is able to start a match in.

Constructors

Link copied to clipboard
constructor(alliance: StartingConfiguration.Alliance, origin: StartingConfiguration.Origin, backwardTranslation: Measure<Distance>, horizontalTranslation: Measure<Distance>, ccwRotation: Measure<Angle>)

Properties

Link copied to clipboard

The alliance this robot is starting in.

Link copied to clipboard

The translation from the center of the field tile to the robot center, in order to touch the field wall.

Link copied to clipboard

Counter-clockwise rotation of the robot in the starting position.

Link copied to clipboard

The translation from the origin to the robot center.

Link copied to clipboard

Whether this starting configuration is on the blue alliance.

Link copied to clipboard

Whether this starting configuration is left-biased.

Link copied to clipboard

Whether this starting configuration is on the red alliance.

Link copied to clipboard

Whether this starting configuration is right-biased.

Link copied to clipboard

The side the robot is biased or has been placed on.

Functions

Link copied to clipboard

Invert this starting configuration over the center of the field, returning a new starting configuration that is a direct mirror on the other alliance (symmetrical mirror).

Link copied to clipboard
fun toFieldPose(): Pose2d

Convert this starting configuration into the FTC Field Coordinate/RoadRunner coordinate system.

Link copied to clipboard

Convert this starting configuration into a face-value StartingPositions entry. Note that pose data is not accounted in this method, and interprets only based on the origin and alliance.

Link copied to clipboard
open override fun toString(): String

Returns a HTML string to represent this starting configuration.

Link copied to clipboard

Return an informative string about this starting configuration.