core / com.acmerobotics.roadrunner.localization / TwoTrackingWheelLocalizer

TwoTrackingWheelLocalizer

abstract class TwoTrackingWheelLocalizer : Localizer

Localizer based on two unpowered tracking omni wheels and an orientation sensor.

Parameters

wheelPositions - wheel positions relative to the center of the robot (positive X points forward on the robot)

wheelOrientations - angular orientations of the wheels measured counterclockwise from positive X in radians

Constructors

<init>

TwoTrackingWheelLocalizer(wheelPositions: List<Vector2d>, wheelOrientations: List<Double>)

Localizer based on two unpowered tracking omni wheels and an orientation sensor.

Properties

poseEstimate

open var poseEstimate: Pose2d

Current robot pose estimate.

Functions

getHeading

abstract fun getHeading(): Double

Returns the heading of the robot (usually from a gyroscope or IMU).

getWheelPositions

abstract fun getWheelPositions(): List<Double>

Returns the positions of the tracking wheels in the desired distance units (not encoder counts!)

update

open fun update(): Unit

Completes a single localization update.