core / com.acmerobotics.roadrunner.localization / TwoTrackingWheelLocalizer

TwoTrackingWheelLocalizer

abstract class TwoTrackingWheelLocalizer : Localizer

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

Parameters

wheelPoses - wheel poses relative to the center of the robot (positive X points forward on the robot)

Constructors

<init>

TwoTrackingWheelLocalizer(wheelPoses: List<Pose2d>)

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.