33template <
size_t NumModules>
36 SwerveDriveWheelPositions<NumModules>> {
60 modulePositions, initialPose,
61 {0.1, 0.1, 0.1}, {0.9, 0.9, 0.9}} {}
88 kinematics, m_odometryImpl, stateStdDevs, visionMeasurementStdDevs),
89 m_odometryImpl{kinematics, gyroAngle, modulePositions, initialPose} {}
142 units::second_t currentTime,
const Rotation2d& gyroAngle,
146 UpdateWithTime(currentTime, gyroAngle, {modulePositions});
154 SwerveDrivePoseEstimator<4>;
#define EXPORT_TEMPLATE_DECLARE(export)
Definition: SymbolExports.h:94
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
Represents a 2D pose containing translational and rotational elements.
Definition: Pose2d.h:23
This class wraps odometry to fuse latency-compensated vision measurements with encoder measurements.
Definition: PoseEstimator.h:38
A rotation in a 2D coordinate frame represented by a point on the unit circle (cosine and sine).
Definition: Rotation2d.h:23
Helper class that converts a chassis velocity (dx, dy, and dtheta components) into individual module ...
Definition: SwerveDriveKinematics.h:56
Class for swerve drive odometry.
Definition: SwerveDriveOdometry.h:36
This class wraps Swerve Drive Odometry to fuse latency-compensated vision measurements with swerve dr...
Definition: SwerveDrivePoseEstimator.h:36
Pose2d Update(const Rotation2d &gyroAngle, const wpi::array< SwerveModulePosition, NumModules > &modulePositions)
Updates the pose estimator with wheel encoder and gyro information.
Definition: SwerveDrivePoseEstimator.h:122
void ResetPosition(const Rotation2d &gyroAngle, const wpi::array< SwerveModulePosition, NumModules > &modulePositions, const Pose2d &pose)
Resets the robot's position on the field.
Definition: SwerveDrivePoseEstimator.h:102
SwerveDrivePoseEstimator(SwerveDriveKinematics< NumModules > &kinematics, const Rotation2d &gyroAngle, const wpi::array< SwerveModulePosition, NumModules > &modulePositions, const Pose2d &initialPose, const wpi::array< double, 3 > &stateStdDevs, const wpi::array< double, 3 > &visionMeasurementStdDevs)
Constructs a SwerveDrivePoseEstimator.
Definition: SwerveDrivePoseEstimator.h:80
Pose2d UpdateWithTime(units::second_t currentTime, const Rotation2d &gyroAngle, const wpi::array< SwerveModulePosition, NumModules > &modulePositions)
Updates the pose estimator with wheel encoder and gyro information.
Definition: SwerveDrivePoseEstimator.h:141
SwerveDrivePoseEstimator(SwerveDriveKinematics< NumModules > &kinematics, const Rotation2d &gyroAngle, const wpi::array< SwerveModulePosition, NumModules > &modulePositions, const Pose2d &initialPose)
Constructs a SwerveDrivePoseEstimator with default standard deviations for the model and vision measu...
Definition: SwerveDrivePoseEstimator.h:54
This class is a wrapper around std::array that does compile time size checking.
Definition: array.h:26
Definition: AprilTagPoseEstimator.h:15
Represents the wheel positions for a swerve drive drivetrain.
Definition: SwerveDriveWheelPositions.h:18