-
Notifications
You must be signed in to change notification settings - Fork 26
Add aba function #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add aba function #138
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the Articulated Body Algorithm (ABA) for efficient floating-base forward dynamics computation in the ADAM robotics library, adding complete support across all backends with corresponding test coverage.
- Added comprehensive ABA implementation in the core RBD algorithms with batched input support and external wrench handling
- Extended spatial math APIs with new matrix operations (inv, solve, mtimes, expand_dims) required for ABA across all backends
- Added extensive test coverage for ABA functionality across NumPy, JAX, PyTorch, and CasADi backends
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/adam/core/rbd_algorithms.py | Core ABA implementation with floating-base dynamics, external wrenches support, and batch processing |
| src/adam/core/spatial_math.py | Added abstract methods for inv, solve, mtimes operations and fixed parameter naming in vxs method |
| src/adam/core/array_api_math.py | Implemented new matrix operations for Array API backend |
| src/adam/casadi/casadi_like.py | Added CasADi-specific implementations of new matrix operations |
| src/adam/casadi/computations.py | Added ABA wrapper method and symbolic function support for CasADi |
| src/adam/jax/jax_like.py | JAX-specific solve implementation handling batched operations correctly |
| src/adam/jax/computations.py | Added JAX ABA wrapper method |
| src/adam/pytorch/torch_like.py | PyTorch-specific solve override to avoid array_api_compat issues |
| src/adam/pytorch/computations.py | Added PyTorch ABA wrapper method |
| src/adam/pytorch/computation_batch.py | Added batched PyTorch ABA wrapper method |
| src/adam/numpy/computations.py | Added NumPy ABA wrapper method |
| tests/*.py | Comprehensive test coverage for ABA across all backends with validation against equations of motion |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
xela-95
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Giulero ! It looks good to me :)
Co-authored-by: Alessandro Croci <[email protected]>
|
Tests are passing! Merging! |
This PR introduces the implementation of the Articulated Body Algorithm.
Copilot summary
Articulated-Body Algorithm (ABA) Implementation
src/adam/core/rbd_algorithms.py, supporting batched inputs, external wrenches, and both velocity representations. This enables efficient computation of joint and base accelerations for robots.src/adam/casadi/computations.py) and JAX (src/adam/jax/computations.py) computation classes, along with symbolic function support for CasADi. [1] [2]Matrix Algebra API Extensions
inv,solve,mtimes,expand_dims) to the spatial math abstract base class (src/adam/core/spatial_math.py) and implemented them for Array API, CasADi, and JAX backends. This provides a uniform interface for matrix inversion, solving linear systems, multiplication, and dimension expansion. [1] [2] [3] [4]Minor Code and Docstring Cleanups
Small API Consistency Fixes
vxsmethod, changingctosfor clarity and consistency across the codebase. [1] [2]References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
📚 Documentation preview 📚: https://adam-docs--138.org.readthedocs.build/en/138/