Repository navigation
imuSensor delta-v issue - #1625
Merged
schaubh merged 4 commits intoOct 17, 2026
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
schaubh
reviewed
Oct 17, 2026
schaubh
left a comment
Contributor
There was a problem hiding this comment.
I agree with issue #1619 and the core fix. The minimal reproduction returned [1.5192, 17.3648, 0] m/s before rebuilding and [0, 0, 0] on this PR. The affected targets and isolated IMU header compiled, and 90 focused IMU, spacecraft, and MuJoCo tests passed. I found no blocking functional defect; the two inline comments identify documentation corrections.
Make sensor-relative velocities and endpoint attitude dependence explicit in the LaTeX model description.
Clarify that offset-sensor kinematics depend on both endpoint attitudes, while historical accumulated delta-v does not create spurious increments.
schaubh
force-pushed
the
hotfix/bsk-1619_imuSensor_deltav
branch
from
October 17, 2026 14:07
cc4324f to
0ab591d
Compare
schaubh
approved these changes
Oct 17, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
imuSensorcomputation ofDVFramePlatformassumes thatTotalAccumDV_BN_Bis the inertial accumulateddelta-v resolved in the current body frame.
spacecraftinstead adds the delta-v of each integration step in the body frame of that step (Spacecraft::postIntegration()), andtest_spacecraft.pychecks that this is how the field is built. As a result, every attitude change between two IMU calls added(I - [BN]_2 [NB]_1) A_1, a term proportional to all the delta-v accumulated since the start of the simulation, to the output.The module now computes the documented quantity from fields that
spacecraftalready writes:The first term is the non-gravitational delta-v of the center of mass, accumulated in inertial components. The second term is the change of the sensor velocity relative to the center of mass. The output no longer depends on the attitude at the previous call.
Alternatives considered and rejected:
TotalAccumDV_BN_Nfield toSCStatesMsgPayload: gives the same numbers, but changes a message payload and every producer.TotalAccumDV_BN_Binspacecraft: changes a published field and breaks the existingspacecrafttest.nonConservativeAccelpntB_Bin the IMU: only correct when the IMU runs at the dynamics rate.While checking the producers of
SCStatesMsgPayload, two related issues were found:MJSite::writeFwdKinematicsMessage()did not initialize the payload. Its documentation only declares the position, velocity, attitude and angular rate of the site, so the other fields are now zero.spacecraftdid not initializenonConservativeAccelpntB_BandomegaDot_BN_B. They held uninitialized values in the message written before the first integration step and, withpointMassTranslationalOnly, during the whole simulation. They are now zero until computed.imuSensor::Reset()kept the state of the previous IMU call. This was already the case before, but the previous state now also includes the delta-v and the sensor velocity relative to the center of mass. The first call after a reset in the middle of a simulation differenced the new state against the state from before the reset.Reset()now clearsNominalReady, so this call outputs a zero message, as the first call of a simulation does.Messages not written by
spacecraftmust now fillTotalAccumDV_CN_N,v_BN_Nandv_CN_Nconsistently.Verification
[1.52, 17.36, 0.0]m/s before the fix. It is now in the unittests.Documentation
imuSensor.rst: new "Delta-v Output" section with the formula, the required input fields, and the limitations._Documentation/secModelDescription.tex: rewritten "Change In Velocity" derivation.MJSite.h:writeFwdKinematicsMessage()documents that the fields a site does not provide are zero.bskKnownIssues.rstentries and release-note snippet.Future work
spacecraftwithpointMassTranslationalOnlydoes not accumulate delta v:postIntegration()returns early and the gravity-velocity states are not registered.TotalAccumDV_*andnonConservativeAccelpntB_Bstay zero under thrust, so the IMU delta v and acceleration are zero in this mode. Check whether this is wanted.