diff --git a/wpimath/src/main/java/edu/wpi/first/math/estimator/DifferentialDrivePoseEstimator.java b/wpimath/src/main/java/edu/wpi/first/math/estimator/DifferentialDrivePoseEstimator.java index c5c05ca948..e1ef116fe0 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/estimator/DifferentialDrivePoseEstimator.java +++ b/wpimath/src/main/java/edu/wpi/first/math/estimator/DifferentialDrivePoseEstimator.java @@ -29,7 +29,7 @@ import java.util.function.BiConsumer; * DifferentialDriveOdometry. * *

{@link DifferentialDrivePoseEstimator#update} should be called every robot loop (if your robot - * loops are faster than the default then you should change the {@link + * loops are faster than the default of 20 ms then you should change the {@link * DifferentialDrivePoseEstimator#DifferentialDrivePoseEstimator(Rotation2d, Pose2d, Matrix, Matrix, * Matrix, double) nominal delta time}.) {@link DifferentialDrivePoseEstimator#addVisionMeasurement} * can be called as infrequently as you want; if you never call it then this class will behave 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 3883a9bb82..dd30f30af6 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 @@ -27,7 +27,7 @@ import java.util.function.BiConsumer; * drop-in for {@link edu.wpi.first.math.kinematics.MecanumDriveOdometry}. * *

{@link MecanumDrivePoseEstimator#update} should be called every robot loop. If your loops are - * faster or slower than the default of 0.02s, then you should change the nominal delta time using + * faster or slower than the default of 20 ms, then you should change the nominal delta time using * the secondary constructor: {@link MecanumDrivePoseEstimator#MecanumDrivePoseEstimator(Rotation2d, * Pose2d, MecanumDriveKinematics, Matrix, Matrix, Matrix, double)}. * 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 1023ef7a0f..ce502a9275 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 @@ -27,7 +27,7 @@ import java.util.function.BiConsumer; * drop-in for {@link edu.wpi.first.math.kinematics.SwerveDriveOdometry}. * *

{@link SwerveDrivePoseEstimator#update} should be called every robot loop. If your loops are - * faster or slower than the default of 0.02s, then you should change the nominal delta time using + * faster or slower than the default of 20 ms, then you should change the nominal delta time using * the secondary constructor: {@link SwerveDrivePoseEstimator#SwerveDrivePoseEstimator(Rotation2d, * Pose2d, SwerveDriveKinematics, Matrix, Matrix, Matrix, double)}. * diff --git a/wpimath/src/main/native/include/frc/estimator/DifferentialDrivePoseEstimator.h b/wpimath/src/main/native/include/frc/estimator/DifferentialDrivePoseEstimator.h index 3654c3edc3..7dc0007cab 100644 --- a/wpimath/src/main/native/include/frc/estimator/DifferentialDrivePoseEstimator.h +++ b/wpimath/src/main/native/include/frc/estimator/DifferentialDrivePoseEstimator.h @@ -25,8 +25,8 @@ namespace frc { * same as DifferentialDriveOdometry. * * Update() should be called every robot loop (if your robot loops are faster or - * slower than the default, then you should change the nominal delta time via - * the constructor). + * slower than the default of 20 ms, then you should change the nominal delta + * time via the constructor). * * AddVisionMeasurement() can be called as infrequently as you want; if you * never call it, then this class will behave like regular encoder odometry. @@ -83,7 +83,7 @@ class WPILIB_DLLEXPORT DifferentialDrivePoseEstimator { const wpi::array& stateStdDevs, const wpi::array& localMeasurementStdDevs, const wpi::array& visionMeasurementStdDevs, - units::second_t nominalDt = 0.02_s); + units::second_t nominalDt = 20_ms); /** * Sets the pose estimator's trust of global measurements. This might be used diff --git a/wpimath/src/main/native/include/frc/estimator/MecanumDrivePoseEstimator.h b/wpimath/src/main/native/include/frc/estimator/MecanumDrivePoseEstimator.h index 24a79cfa1a..5008280986 100644 --- a/wpimath/src/main/native/include/frc/estimator/MecanumDrivePoseEstimator.h +++ b/wpimath/src/main/native/include/frc/estimator/MecanumDrivePoseEstimator.h @@ -25,7 +25,7 @@ namespace frc { * easy but more accurate drop-in for MecanumDriveOdometry. * * Update() should be called every robot loop. If your loops are faster or - * slower than the default of 0.02s, then you should change the nominal delta + * slower than the default of 20 ms, then you should change the nominal delta * time by specifying it in the constructor. * * AddVisionMeasurement() can be called as infrequently as you want; if you @@ -78,7 +78,7 @@ class WPILIB_DLLEXPORT MecanumDrivePoseEstimator { const wpi::array& stateStdDevs, const wpi::array& localMeasurementStdDevs, const wpi::array& visionMeasurementStdDevs, - units::second_t nominalDt = 0.02_s); + units::second_t nominalDt = 20_ms); /** * Sets the pose estimator's trust of global measurements. This might be used diff --git a/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h b/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h index 531ad94de9..ff5103645b 100644 --- a/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h +++ b/wpimath/src/main/native/include/frc/estimator/SwerveDrivePoseEstimator.h @@ -28,7 +28,7 @@ namespace frc { * easy but more accurate drop-in for SwerveDriveOdometry. * * Update() should be called every robot loop. If your loops are faster or - * slower than the default of 0.02s, then you should change the nominal delta + * slower than the default of 20 ms, then you should change the nominal delta * time by specifying it in the constructor. * * AddVisionMeasurement() can be called as infrequently as you want; if you @@ -82,7 +82,7 @@ class SwerveDrivePoseEstimator { const wpi::array& stateStdDevs, const wpi::array& localMeasurementStdDevs, const wpi::array& visionMeasurementStdDevs, - units::second_t nominalDt = 0.02_s) + units::second_t nominalDt = 20_ms) : m_observer([](const Vectord<3>& x, const Vectord<3>& u) { return u; }, [](const Vectord<3>& x, const Vectord<3>& u) { return x.block<1, 1>(2, 0);