[wpimath] Clean up PoseEstimator nominal dt docs (#4496)

This commit is contained in:
Tyler Veness
2022-10-21 19:53:58 -07:00
committed by GitHub
parent 8f2e34c6a3
commit c195b4fc46
6 changed files with 10 additions and 10 deletions

View File

@@ -29,7 +29,7 @@ import java.util.function.BiConsumer;
* DifferentialDriveOdometry.
*
* <p>{@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

View File

@@ -27,7 +27,7 @@ import java.util.function.BiConsumer;
* drop-in for {@link edu.wpi.first.math.kinematics.MecanumDriveOdometry}.
*
* <p>{@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)}.
*

View File

@@ -27,7 +27,7 @@ import java.util.function.BiConsumer;
* drop-in for {@link edu.wpi.first.math.kinematics.SwerveDriveOdometry}.
*
* <p>{@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)}.
*

View File

@@ -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<double, 5>& stateStdDevs,
const wpi::array<double, 3>& localMeasurementStdDevs,
const wpi::array<double, 3>& 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

View File

@@ -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<double, 3>& stateStdDevs,
const wpi::array<double, 1>& localMeasurementStdDevs,
const wpi::array<double, 3>& 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

View File

@@ -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<double, 3>& stateStdDevs,
const wpi::array<double, 1>& localMeasurementStdDevs,
const wpi::array<double, 3>& 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);