MecanumLocalizer

class MecanumLocalizer @JvmOverloads constructor(val getWheelPositions: () -> List<Double>, val getWheelVelocities: () -> List<Double>? = { null }, trackWidth: Double, wheelBase: Double = trackWidth, lateralMultiplier: Double = 1.0) : DeadReckoningLocalizer

Default localizer for mecanum drives based on the drive encoders.

Parameters

getWheelPositions

wheel positions in linear distance units

getWheelVelocities

lateral distance between pairs of wheels on different sides of the robot

wheelBase

distance between pairs of wheels on the same side of the robot

lateralMultiplier

lateral multiplier

Constructors

Link copied to clipboard
constructor(getWheelPositions: () -> List<Double>, getWheelVelocities: () -> List<Double>? = { null }, trackWidth: Double, wheelBase: Double = trackWidth, lateralMultiplier: Double = 1.0)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var lastRobotPoseDelta: Pose2d

The last computed change in relative robot position.

Link copied to clipboard
open override var poseEstimate: Pose2d

Current robot pose estimate.

Link copied to clipboard
open override var poseVelocity: Pose2d?

Current robot pose velocity (optional)

Functions

Link copied to clipboard
open override fun update()

Completes a single localization update.