public static class SwerveDrive.SwerveLocalizer implements Localizer
Default localizer for swerve drives based on the drive encoder positions, module orientations, and (optionally) a heading sensor.
| Constructor and Description |
|---|
SwerveLocalizer(SwerveDrive drive,
boolean useExternalHeading)
Default localizer for swerve drives based on the drive encoder positions, module orientations, and (optionally) a
heading sensor.
|
SwerveLocalizer(SwerveDrive drive)
Default localizer for swerve drives based on the drive encoder positions, module orientations, and (optionally) a
heading sensor.
|
| Modifier and Type | Method and Description |
|---|---|
Pose2d |
getPoseEstimate()
Current robot pose estimate.
|
void |
setPoseEstimate(Pose2d value)
Current robot pose estimate.
|
void |
update()
Completes a single localization update.
|
getPoseEstimate, setPoseEstimate, update@JvmOverloads
public SwerveLocalizer(@NotNull
SwerveDrive drive,
boolean useExternalHeading)
Default localizer for swerve drives based on the drive encoder positions, module orientations, and (optionally) a heading sensor.
drive - driveuseExternalHeading - use external heading provided by an external sensor (e.g., IMU, gyroscope)@JvmOverloads
public SwerveLocalizer(@NotNull
SwerveDrive drive)
Default localizer for swerve drives based on the drive encoder positions, module orientations, and (optionally) a heading sensor.
drive - drive