[codex] Add dynamics integration helpers - #3
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds public “dynamics stepping” helpers on MultiBody to integrate configuration/velocity forward in time using either semi-implicit Euler or an RK4-based scheme, building on forward_dynamics_ab. It also adds an SE(3) exponential utility to support integrating SixDOF joints using body-frame twists ordered as [linear; angular], and introduces integration-focused test coverage and documentation.
Changes:
- Introduces
DynamicsState,DynamicsStepInput,IntegrationMethod, andIntegrationOptions, plusstep_dynamics/try_step_dynamicsintegration entrypoints. - Implements SE(3) exponential mapping (
exp_se3) for[linear; angular]body-frame twists and uses it forSixDOFpose advancement (including RK4 stage composition). - Adds integration helper tests and README documentation for the new checked stepping API.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/multibody.rs |
Adds new integration API/types and implements Euler + RK4 stepping on top of forward dynamics. |
src/math_functions.rs |
Adds exp_se3 to integrate SixDOF poses via SE(3) exponential for [linear; angular] twists. |
tests/integration_helpers.rs |
Adds tests validating Euler/RK4 stepping behavior and input validation/panic messages. |
README.md |
Documents the new integration helpers and mentions try_step_dynamics among checked APIs. |
💡 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
Adds convenience dynamics stepping helpers around
forward_dynamics_ab:DynamicsState,DynamicsStepInput,IntegrationMethod, andIntegrationOptionsstep_dynamics/try_step_dynamicsfor semi-implicit Euler and RK4-style steppingSixDOFbody-frame twists ordered[linear; angular]ForwardDynamicsWorkspaceacross step acceleration evaluationsValidation
Ran locally:
cargo fmt --checkcargo testcargo test --benchescargo clippy --all-targets --all-features -- -D warningsgit diff --checkNotes
SixDOFRK4 uses a fourth-order generalized-velocity update and ordered SE(3) stage composition for poses, rather than averaging body-frame stage twists.