SwerveLocalizer

constructor(modules: List<SwerveModule>, trackWidth: Double, wheelBase: Double = trackWidth)

Default localizer for swerve drives based on the drive encoder positions and module orientations.

Parameters

modules

the individual swerve modules

trackWidth

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

wheelBase

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


constructor(modules: List<SwerveModule>, modulePositions: List<Vector2d>)

Parameters

modules

the individual swerve modules

modulePositions

the positions of all the modules relative to the center of rotation of the robot