Repository navigation
Improve rigid body kinematics library - #1624
Merged
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
force-pushed
the
feature/fix_rigidBodyKinematics
branch
from
October 17, 2026 00:49
ba35936 to
e1ad9dd
Compare
Preserve the represented rotation at and near singularities across all 12 Euler sequences in C, Python, and Numba. Recover the observable first angle with the third angle set to zero at singularities, and compose symmetric Euler sets through direction cosine matrices. Correct the C and Python self-check truth values. Validate reconstruction of identity, ordinary, singular, and near-singular rotations: 301 Python/Numba checks and 60 native C tests pass.
Preserve identity, small rotations, and half-turns in PRV conversions; use analytic zero-angle limits in PRV rate maps and quaternion-based composition for PRVs and MRPs. Wrap angles across multiple revolutions. Retain simple double-precision formulas, add Python/Numba MRPshadow, and preserve in-place C Gibbs/MRP-to-quaternion conversions. Extend the Rust bindings and cover practical boundaries without extreme-value machinery. Use explicit cross-product components so MRP composition compiles on macOS worker stacks with current Numba. Allow roundoff at navigation noise bounds and validate thruster impulse delivery using actual firing delays and cancellation, alongside the short-run regulation response. Validation: Python/Numba attitude checks, 68 native C tests, 6 Rust tests, and affected navigation and thruster scenarios. Shortened-pulse mutations are rejected by the delivery assertion.
Normalize sequence inputs and promote arithmetic to double precision in MRP, Gibbs, and rate routines. Support non-contiguous PRV arrays and keep MRPswitch threshold comparisons consistent with C and Rust. Expose Python wrappers and Numba overloads instead of public dispatchers, preserving list and tuple support without deprecated list reflection. Document compiled-call requirements, consolidate release notes and known issues, and state the shared numerical scope and representation limits. Exercise cold compilation on a small worker-thread stack and reload the compiled caller cache in a second process without adding a test case. Validation: 1,053 Python/Numba and affected scenario tests with Numba deprecation warnings treated as errors, 68 native C tests, and 6 Rust tests. The final files match the reviewed working tree.
schaubh
force-pushed
the
feature/fix_rigidBodyKinematics
branch
from
October 17, 2026 02:20
e1ad9dd to
752dd83
Compare
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
Correct rigid-body kinematics conversions and composition that could produce invalid results or lose the represented rotation at identity, small rotations, half-turns, and Euler singularities. Preserve consistent behavior across C, Python, Numba, and the corresponding Rust bindings.
The branch contains three commits:
Numba public functions are now Python callables with compiled overloads. Dispatcher-specific attributes such as
.py_funcand.signaturesare no longer part of the public interface.The implementation retains straightforward double-precision formulas. Arbitrary extreme-value handling is intentionally outside the documented numerical scope.
Verification
Local RBK validation passed:
Each commit was validated at its own revision. Regression coverage includes numerical boundaries, input containers, compiled calls, cache reuse, and in-place conversions. Incorrect Euler truth values were corrected; redundant and extreme-value tests were removed.
The consolidated branch matches the reviewed final implementation, with only the approved test-docstring correction.
Documentation
Updated the Numba guide to explain input conversion, compiled-call requirements, and the public callable interface. Added shared numerical limits and representation-singularity guidance. Consolidated the release notes and known-issues entries for both tickets.
Future work
No additional work is required for these tickets.