Skip to content

Commit e680f81

Browse files
authored
Update comment on m_visionUpdates
1 parent 9ecbc18 commit e680f81

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

wpimath/src/main/java/edu/wpi/first/math/estimator/PoseEstimator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public class PoseEstimator<T> {
4848
TimeInterpolatableBuffer.createBuffer(kBufferDuration);
4949
// Maps timestamps to vision updates
5050
// Always contains one entry before the oldest entry in m_odometryPoseBuffer, unless there have
51-
// been no vision measurements after the last reset
51+
// been no vision measurements after the last reset. May contain one entry while
52+
// m_odometryPoseBuffer is empty to correct for translation/rotation after a call to
53+
// ResetRotation/ResetTranslation.
5254
private final NavigableMap<Double, VisionUpdate> m_visionUpdates = new TreeMap<>();
5355

5456
private Pose2d m_poseEstimate;

wpimath/src/main/java/edu/wpi/first/math/estimator/PoseEstimator3d.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ public class PoseEstimator3d<T> {
5656
TimeInterpolatableBuffer.createBuffer(kBufferDuration);
5757
// Maps timestamps to vision updates
5858
// Always contains one entry before the oldest entry in m_odometryPoseBuffer, unless there have
59-
// been no vision measurements after the last reset
59+
// been no vision measurements after the last reset. May contain one entry while
60+
// m_odometryPoseBuffer is empty to correct for translation/rotation after a call to
61+
// ResetRotation/ResetTranslation.
6062
private final NavigableMap<Double, VisionUpdate> m_visionUpdates = new TreeMap<>();
6163

6264
private Pose3d m_poseEstimate;

wpimath/src/main/native/include/frc/estimator/PoseEstimator.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,9 @@ class WPILIB_DLLEXPORT PoseEstimator {
475475
TimeInterpolatableBuffer<Pose2d> m_odometryPoseBuffer{kBufferDuration};
476476
// Maps timestamps to vision updates
477477
// Always contains one entry before the oldest entry in m_odometryPoseBuffer,
478-
// unless there have been no vision measurements after the last reset
478+
// unless there have been no vision measurements after the last reset. May
479+
// contain one entry while m_odometryPoseBuffer is empty to correct for
480+
// translation/rotation after a call to ResetRotation/ResetTranslation.
479481
std::map<units::second_t, VisionUpdate> m_visionUpdates;
480482

481483
Pose2d m_poseEstimate;

wpimath/src/main/native/include/frc/estimator/PoseEstimator3d.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,9 @@ class WPILIB_DLLEXPORT PoseEstimator3d {
486486
TimeInterpolatableBuffer<Pose3d> m_odometryPoseBuffer{kBufferDuration};
487487
// Maps timestamps to vision updates
488488
// Always contains one entry before the oldest entry in m_odometryPoseBuffer,
489-
// unless there have been no vision measurements after the last reset
489+
// unless there have been no vision measurements after the last reset. May
490+
// contain one entry while m_odometryPoseBuffer is empty to correct for
491+
// translation/rotation after a call to ResetRotation/ResetTranslation.
490492
std::map<units::second_t, VisionUpdate> m_visionUpdates;
491493

492494
Pose3d m_poseEstimate;

0 commit comments

Comments
 (0)