[codex] Update multibody dynamics to 0.4.2 - #1
Merged
Conversation
- Bump multibody_dynamics 0.2.2 -> 0.4.0 (requires nalgebra 0.34) and nalgebra 0.33 -> 0.34; rename minimal_to_homogenous_configuration -> minimal_to_homogeneous_configuration to match the 0.4 API. - Vendor ode_solvers 0.6.1 under vendor/ode_solvers with its nalgebra dependency bumped to 0.34 (no published ode_solvers release supports nalgebra 0.34 yet); depend on it via path. Source is unmodified. - Replace try_inverse().unwrap() in the thruster allocation with a damped (Tikhonov) pseudo-inverse so the Gram matrix is always invertible (no mid-integration panic), with a fallback to the desired generalised force. - Add optional thruster_force_max config: when set, allocated thruster commands are clamped to an actual per-thruster force limit in newtons (normalised by direction norm) before reconstructing the generalised force, modelling actuator saturation. Default off (behaviour-preserving). - Track Cargo.lock (binary crate) for reproducible builds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the simulator’s Rust dependency stack to match multibody_dynamics 0.4.2 (and nalgebra 0.34), adapts the simulator code to the updated multibody API, and vendors ode_solvers to bridge the nalgebra version gap while also improving runtime performance by reusing forward-dynamics scratch workspace.
Changes:
- Bump
multibody_dynamicsto0.4.2andnalgebrato0.34, switching the simulator to the newMultiBody::from_config(...)+LinkPropertiesconstruction. - Reuse
ForwardDynamicsWorkspaceviaforward_dynamics_ab_with_workspace(...)during RHS evaluations to reduce per-step allocations. - Vendor
ode_solvers(0.6.1) with updated dependency versions to remain compatible withnalgebra0.34.
Reviewed changes
Copilot reviewed 4 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
Cargo.toml |
Updates dependency versions and switches ode_solvers to a vendored path dependency. |
Cargo.lock |
Regenerated lockfile reflecting the new dependency graph (notably multibody_dynamics/nalgebra). |
src/main.rs |
Updates multibody construction API, adds workspace reuse for forward dynamics, and adds optional thruster force saturation in allocation. |
README.md |
Documents why vendor/ode_solvers exists and when it can be removed. |
eely_config.yml |
Adds commented configuration option for per-thruster force limiting. |
.gitignore |
Stops ignoring Cargo.lock and broadens .dat ignores to *.dat. |
vendor/ode_solvers/** |
Adds vendored ode_solvers source and tests with updated dependency versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
multibody_dynamicsfrom0.4.0to0.4.2.MultiBody::new(...)construction withMultiBody::from_config(...)and explicitLinkProperties.ForwardDynamicsWorkspacein the simulator RHS path viaforward_dynamics_ab_with_workspace(...).Impact
This keeps the simulator on the current multibody dynamics API and avoids repeated articulated-body scratch allocation during ODE solver evaluations. The adaptive
Dopri5simulation flow remains unchanged.A temporary local RHS benchmark, not included in this PR, measured:
Validation
cargo checkcargo testcargo clippy --all-targets --all-featurescompleted with existing style warningsgit diff --check