MecanumDriveLocalizer

constructor(hardwareMap: HardwareMap, inPerTick: Double, imu: IMU, kinematics: MecanumKinematics, lfName: String = "leftFront", lbName: String = "leftBack", rfName: String = "rightFront", rbName: String = "rightBack", lfDirection: DcMotorSimple.Direction = DcMotorSimple.Direction.FORWARD, lbDirection: DcMotorSimple.Direction = DcMotorSimple.Direction.FORWARD, rfDirection: DcMotorSimple.Direction = DcMotorSimple.Direction.FORWARD, rbDirection: DcMotorSimple.Direction = DcMotorSimple.Direction.FORWARD, initialPose: Pose2d = Pose2d.zero)

Creates a new localizer.

Parameters

hardwareMap

hardware map

inPerTick

inches per tick

imu

IMU

kinematics

mecanum kinematics

lfName

name of the left front motor

lbName

name of the left back motor

rfName

name of the right front motor

rbName

name of the right back motor

lfDirection

direction of the left front motor

lbDirection

direction of the left back motor

rfDirection

direction of the right front motor

rbDirection

direction of the right back motor

initialPose

initial pose


constructor(hardwareMap: HardwareMap, inPerTick: Double, imu: IMU, kinematics: MecanumKinematics, leftFront: Encoder, leftBack: Encoder, rightFront: Encoder, rightBack: Encoder, initialPose: Pose2d = Pose2d.zero)

Parameters

hardwareMap

hardware map

inPerTick

inches per tick

imu

IMU

kinematics

mecanum kinematics

leftFront

left front encoder

leftBack

left back encoder

rightFront

right front encoder

rightBack

right back encoder

initialPose

initial pose