TankLocalizer

constructor(hardwareMap: HardwareMap, kinematics: TankKinematics, inPerTick: Double, leftNames: List<String> = listOf("leftFront", "leftBack"), rightNames: List<String> = listOf("rightFront", "rightBack"), leftDirections: List<DcMotorSimple.Direction> = listOf(DcMotorSimple.Direction.FORWARD, DcMotorSimple.Direction.FORWARD), rightDirections: List<DcMotorSimple.Direction> = listOf(DcMotorSimple.Direction.FORWARD, DcMotorSimple.Direction.FORWARD), initialPose: Pose2d = Pose2d.zero)

Creates a new localizer.

Parameters

hardwareMap

hardware map

kinematics

tank kinematics

inPerTick

inches per tick

leftNames

names of the left motors

rightNames

names of the right motors

leftDirections

directions of the left motors

rightDirections

directions of the right motors

initialPose

initial pose


constructor(hardwareMap: HardwareMap, inPerTick: Double, kinematics: TankKinematics, leftEncoders: List<Encoder>, rightEncoders: List<Encoder>, initialPose: Pose2d = Pose2d.zero)

Parameters

hardwareMap

hardware map

inPerTick

inches per tick

kinematics

tank kinematics

leftEncoders

left encoders

rightEncoders

right encoders

initialPose

initial pose