SwerveLocalizer

public SwerveLocalizer SwerveLocalizer(List<SwerveModule> modules, Double trackWidth, Double wheelBase)

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


public SwerveLocalizer SwerveLocalizer(List<SwerveModule> modules, List<Vector2d> modulePositions)

Parameters

modules

the individual swerve modules

modulePositions

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