Repository navigation
Preserve clean controls in histogram localization observations - #1515
Open
Elon-Jiang wants to merge 1 commit into
Open
Elon-Jiang wants to merge 1 commit into
Elon-Jiang wants to merge 1 commit into
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.com>
This branch has not been deployed
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.
Reference issue
No matching open Issue/PR found after checking all open PR file lists, complete focused searches and the full histogram-filter source history.
What does this implement/fix?
observationcreates a view of the supplied clean control (ud = u[:, :]) and adds speed-sensor noise in place. This changes the caller's command. Reusing a constant command therefore feeds accumulated measurement noise into subsequent true-state propagation; a read-only command also raises instead of producing an observation.Copy the control before adding noise, keeping the simulated noisy measurement separate from the clean input. The noise distribution, random draws, kinematic model, filter and public interface are unchanged. The default example, which constructs a fresh command each step, retains its behaviour; reused commands now preserve the intended true trajectory.
For a command
[1.0, 0.1]and NumPy seed 0, the old caller-owned speed becomes 1.8820, 2.0821, then 2.5715 over three observations. The third true-position error against propagation with the original command is 0.1964 m. The fix leaves the command unchanged and that error at zero.Additional information
Normal source imports and pinned requirements, Python 3.13.11 on macOS arm64. Tests run the actual observation and kinematic functions; a supplied distant RFID landmark gives a legitimate no-landmark-in-range case. No simulator, hardware or replacement sensor algorithm is claimed.
bash runtests.sh: 159 passed in 69.19 s, including changed-file Ruff/type checks and warnings-as-errors, with BLAS/OMP threads limited to one.git diff --check: passed.make htmlwith warnings-as-errors: passed. Existing official page updated; generated paragraph and parent navigation verified.Prepared and tested with assistance from OpenAI Codex.
CheckList