From 2e5f9e45bb1f6ea1cecb1913dfffc33dd4fa192c Mon Sep 17 00:00:00 2001 From: Jordan McMichael Date: Wed, 16 Nov 2022 18:20:05 -0500 Subject: [PATCH] [wpimath] Remove encoder reset comments on Swerve, Mecanum Odometry and Pose Estimation (#4643) In both of these cases, encoder resets are not required for normal use. --- .../edu/wpi/first/math/estimator/MecanumDrivePoseEstimator.java | 2 -- .../edu/wpi/first/math/estimator/SwerveDrivePoseEstimator.java | 2 -- .../java/edu/wpi/first/math/kinematics/SwerveDriveOdometry.java | 2 ++ .../native/include/frc/estimator/MecanumDrivePoseEstimator.h | 2 -- .../native/include/frc/estimator/SwerveDrivePoseEstimator.h | 2 -- 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/wpimath/src/main/java/edu/wpi/first/math/estimator/MecanumDrivePoseEstimator.java b/wpimath/src/main/java/edu/wpi/first/math/estimator/MecanumDrivePoseEstimator.java index de2d31c7fe..af1448b9de 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/estimator/MecanumDrivePoseEstimator.java +++ b/wpimath/src/main/java/edu/wpi/first/math/estimator/MecanumDrivePoseEstimator.java @@ -197,8 +197,6 @@ public class MecanumDrivePoseEstimator { /** * Resets the robot's position on the field. * - *

You NEED to reset your encoders (to zero) when calling this method. - * *

The gyroscope angle does not need to be reset in the user's robot code. The library * automatically takes care of offsetting the gyro angle. * diff --git a/wpimath/src/main/java/edu/wpi/first/math/estimator/SwerveDrivePoseEstimator.java b/wpimath/src/main/java/edu/wpi/first/math/estimator/SwerveDrivePoseEstimator.java index caed869652..6e2b1350ba 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/estimator/SwerveDrivePoseEstimator.java +++ b/wpimath/src/main/java/edu/wpi/first/math/estimator/SwerveDrivePoseEstimator.java @@ -244,8 +244,6 @@ public class SwerveDrivePoseEstimatorYou NEED to reset your encoders (to zero) when calling this method. - * *

The gyroscope angle does not need to be reset in the user's robot code. The library * automatically takes care of offsetting the gyro angle. * diff --git a/wpimath/src/main/java/edu/wpi/first/math/kinematics/SwerveDriveOdometry.java b/wpimath/src/main/java/edu/wpi/first/math/kinematics/SwerveDriveOdometry.java index 73369f254d..de71fed63e 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/kinematics/SwerveDriveOdometry.java +++ b/wpimath/src/main/java/edu/wpi/first/math/kinematics/SwerveDriveOdometry.java @@ -75,6 +75,8 @@ public class SwerveDriveOdometry { *

The gyroscope angle does not need to be reset here on the user's robot code. The library * automatically takes care of offsetting the gyro angle. * + *

Similarly, module positions do not need to be reset in user code. + * * @param pose The position on the field that your robot is at. * @param gyroAngle The angle reported by the gyroscope. * @param modulePositions The wheel positions reported by each module. diff --git a/wpimath/src/main/native/include/frc/estimator/MecanumDrivePoseEstimator.h b/wpimath/src/main/native/include/frc/estimator/MecanumDrivePoseEstimator.h index 1a072dcde7..84ad3b94e7 100644 --- a/wpimath/src/main/native/include/frc/estimator/MecanumDrivePoseEstimator.h +++ b/wpimath/src/main/native/include/frc/estimator/MecanumDrivePoseEstimator.h @@ -108,8 +108,6 @@ class WPILIB_DLLEXPORT MecanumDrivePoseEstimator { /** * Resets the robot's position on the field. * - *

You NEED to reset your encoders (to zero) when calling this method. - * *

The gyroscope angle does not need to be reset in the user's robot code. * The library automatically takes care of offsetting the gyro angle. * diff --git a/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h b/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h index 2a0cbfa4bb..327ca0a779 100644 --- a/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h +++ b/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h @@ -138,8 +138,6 @@ class SwerveDrivePoseEstimator { /** * Resets the robot's position on the field. * - * You NEED to reset your encoders (to zero) when calling this method. - * * The gyroscope angle does not need to be reset in the user's robot code. * The library automatically takes care of offsetting the gyro angle. *