Swerve Localizer
constructor(hardwareMap: HardwareMap, cpr: Int, inPerTick: Double, imu: IMU, kinematics: SwerveKinematics, driveNames: List<String> = listOf("lfDrive", "frDrive", "blDrive", "brDrive"), steeringNames: List<String> = listOf("lfSteering", "rfSteering", "lbSteering", "rbSteering"), driveDirections: List<DcMotorSimple.Direction> = driveNames.map { DcMotorSimple.Direction.FORWARD }, steeringDirections: List<DcMotorSimple.Direction> = steeringNames.map { DcMotorSimple.Direction.FORWARD }, initialPose: Pose2d = Pose2d.zero)
Creates a new localizer.
Parameters
hardware Map
hardware map
cpr
counts per revolution of the steering encoders
in Per Tick
inches per tick of the drive encoders
imu
IMU
kinematics
swerve kinematics
drive Names
names of the drive motors
steering Names
names of the steering motors
drive Directions
directions of the drive motors
steering Directions
directions of the steering motors
initial Pose
initial pose
constructor(hardwareMap: HardwareMap, cpr: Int, inPerTick: Double, imu: IMU, kinematics: SwerveKinematics, driveEncoders: List<Encoder>, steeringEncoders: List<Encoder>, initialPose: Pose2d = Pose2d.zero)
Parameters
hardware Map
hardware map
cpr
counts per revolution of the steering encoders
in Per Tick
inches per tick of the drive encoders
imu
IMU
kinematics
swerve kinematics
drive Encoders
drive encoders
steering Encoders
steering encoders
initial Pose
initial pose