Skip to content

2/2 Use odom topic with velocity and add noise model on top - #4

Merged
vincenttumminello merged 14 commits into
mainfrom
tumminello/add-odometry-noise-model
Oct 17, 2026
Merged

vincenttumminello merged 14 commits into
mainfrom
tumminello/add-odometry-noise-model

Conversation

@vincenttumminello

@vincenttumminello vincenttumminello commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

This builds on PR #3 by adding a noise model of the form $v_{est} = scale * v_{true} + bias + white noise$ to make it more true to real.

TODO: still need to verify it actually works. And look into other methods of corruption

vincenttumminello and others added 3 commits September 12, 2026 21:44
rt/odometer_state and rt/odom published the base's ground truth, while
the real K1's odometry is the controller's estimate and drifts, so
localisation in sim saw better odometry than it will on the robot.

OdometryModel corrupts the planar body velocity (vx, vy, wz) with a
scale error, white noise and a random-walk bias, and integrates the
odometry pose from it, so both topics carry the same consistent
estimate. The noise terms are densities, so the drift is independent of
the publish rate. Configured in config/odometry.yaml, off by default
with untuned placeholder values; with it off the output is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yZBRrPMFAxdS4A93XWANS
A random-walk bias grows without bound, so a long sim session drifted
more than a short one, and a recording could not pin it down: the bias
accumulated since the recording started shows up as its own error
growth. Model it instead as a first-order Gauss-Markov process with a
standard deviation and a time constant, stationary from the first
sample, whose pose error over a window of T seconds has the closed form
s^2 T + 2 b^2 tau^2 (T/tau - 1 + exp(-T/tau)) that a recording with
motion capture can be fitted to.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yZBRrPMFAxdS4A93XWANS
Comment thread mujoco/module/SdkBridge/src/OdometryModel.cpp Outdated
jpptm
jpptm previously approved these changes Oct 2, 2026
@vincenttumminello

Copy link
Copy Markdown
Collaborator Author

I changed it but it required bumping the CXX_STANDARD to 20 from 17. lmk if you want this reverted and I'll go back to kPi.

@jpptm jpptm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just the newline at the end and it can go in straight away

Comment thread mujoco/config/odometry.yaml
Comment thread mujoco/CMakeLists.txt
Comment thread .vscode/settings.json Outdated
Comment thread mujoco/config/odometry.yaml
Comment thread mujoco/module/SdkBridge/src/StatePublisher.cpp
vincenttumminello and others added 2 commits October 17, 2026 07:24
The file holds a machine-specific cmake.sourceDirectory path and was
committed by accident. It stays on disk locally; only the tracking is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VEGnPqynL7mkSCLuvyBvuh
No conflicts. Brought in main's SimCore.cpp/.hpp changes and the removal of
mujoco/tools/walk_surface_sweep.py; all merged automatically.
.vscode/settings.json stays untracked on this branch (see previous commit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VEGnPqynL7mkSCLuvyBvuh
@vincenttumminello
vincenttumminello merged commit a5ecc54 into main Oct 17, 2026
4 checks passed
@vincenttumminello
vincenttumminello deleted the tumminello/add-odometry-noise-model branch October 17, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants