core / com.acmerobotics.roadrunner.drive / SwerveDrive / SwerveLocalizer / <init>

<init>

SwerveLocalizer(drive: SwerveDrive, useExternalHeading: Boolean = true)

Default localizer for swerve drives based on the drive encoder positions, module orientations, and (optionally) a heading sensor.

Parameters

drive - drive

useExternalHeading - use external heading provided by an external sensor (e.g., IMU, gyroscope)