MecanumDriveLocalizer

class MecanumDriveLocalizer(leftFront: DcMotorEx, leftBack: DcMotorEx, rightBack: DcMotorEx, rightFront: DcMotorEx, kinematics: MecanumKinematics, val imu: IMU, inPerTick: Double, var pose: Pose2d) : RoadRunnerLocalizer

A RoadRunnerLocalizer that uses the drive encoders and an IMU to localize the robot.

Parameters

leftFront

the left front motor

leftBack

the left rear motor

rightBack

the right rear motor

rightFront

the right front motor

kinematics

the mecanum kinematics

imu

the imu

inPerTick

the number of inches per encoder tick

pose

the initial pose

Constructors

Link copied to clipboard
constructor(leftFront: DcMotorEx, leftBack: DcMotorEx, rightBack: DcMotorEx, rightFront: DcMotorEx, kinematics: MecanumKinematics, imu: IMU, inPerTick: Double, pose: Pose2d)

Properties

Link copied to clipboard
val imu: IMU
Link copied to clipboard
val leftBackEncoder: Encoder

the left rear encoder

Link copied to clipboard
val leftFrontEncoder: Encoder

the left front encoder

Link copied to clipboard
open override var pose: Pose2d
Link copied to clipboard
val rightBackEncoder: Encoder

the right rear encoder

Link copied to clipboard
val rightFrontEncoder: Encoder

the right front encoder

Functions

Link copied to clipboard
open override fun update(): PoseVelocity2d