Repository navigation
Add mount offset acceleration to the IMU model - #14
Merged
Merged
Conversation
The IMU reported base_link acceleration wherever it was mounted. On a rigid body, a point at offset r also feels alpha x r and omega x (omega x r). In a 0.5 rad/s turn, an IMU 1 m ahead and 0.5 m left of base_link should read -0.25 m/s^2 forward and 1.375 m/s^2 left, not 0 and 1.5. The vehicle snapshot now carries yaw acceleration, and the IMU adds both terms for its mount position. The default IMU mount is at base_link, so default runs do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
The IMU reported
base_linkacceleration wherever it was mounted. On a rigid body, a point at offset r frombase_linkalso has two extra terms:Measured on
mainin a steady 0.5 rad/s turn at 3 m/s, with the IMU 1 m ahead and 0.5 m left: the IMU read 0 m/s² forward and 1.5 m/s² left, the same as atbase_link. Physics gives -0.25 and 1.375.Fix
captureVehicleSnapshotaddsbodyAngularAcceleration, the yaw-rate change since the previous snapshot.accelerationAtOffset(snapshot, offset)adds both terms with Three.jsVector3.crossVectors.buildImuMeasurementuses it with the IMU mount position (sensorConfig.pose.position) before gravity and the sensor rotation.Checked with a local script, outside the repo, IMU at (1, 0.5, 0):
Effect on existing runs
The default IMU mount is at
base_link, so default runs do not change. Only runs with an offset IMU mount see new values.Tests
npm teston a clean copy ofmainwith this and the other open sensor PRs merged: 1968 pass, 6 skipped, 1 fail. The failure isPython decodes retained RGB, depth, and CameraInfo SFLog messages, which also fails onmain.🤖 Generated with Claude Code