Repository navigation
fix(sdk): keep an imu sample that arrives after an image at its time - #619
Merged
Merged
Conversation
When an image reaches the filter clock before the IMU sample that shares its timestamp, the image holds the previous sample up to the clock and the sample then arrives with dt = 0. Both backends dropped it as a duplicate, so the next interval started from the rate interpolated between the older and the later sample instead of from the sample itself, breaking the two-endpoint convention of #616. Both now remember a sample new at the clock without propagating again, and still reject true duplicates. EuRoC's replay delivers IMU samples at or before a frame first, so no recorded number changes. The tests compare image-first with IMU-first delivery; without the fix they differ by 1.25e-3 rad. Raised in review of #618. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 3 billable files and costs up to $0.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 21 minutes for your next included review. View limit details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #618, from CodeRabbit's last review on it.
When an image reaches the filter clock before the IMU sample with the same timestamp, the image holds the previous sample up to the clock (the causal hold of #616), and the sample then arrives with
dt = 0. Both backends dropped it as a duplicate. The next interval then started from the rate interpolated between the older and the later sample, not from the sample itself, which breaks #616's two-endpoint convention.Both backends now remember a sample that is new at the clock, without propagating again. True duplicates (a sample time already remembered) are still rejected.
Changes
sdk/include/branes/sdk/msckf_backend.hpp:process_imukeeps a new equal-clock sample.sdk/include/branes/sdk/msckf/invariant_vio_backend.hpp: the same.tests/sdk/filter_clock.cpp: one test per backend comparing image-first with IMU-first delivery at a tie. The gyro is constant up to the tie and steps after it, so the two orders must agree to roundoff. Without the fix they differ by 1.25e-3 rad, the predicted midpoint error.Impact
EuRoC's replay delivers every IMU sample at or before a frame first (
asl_replay.hpp), so this path never ran there. No recorded numbers or fixtures change.Test Results
filter_clock(new cases fail without the fix)🤖 Generated with Claude Code