-
Notifications
You must be signed in to change notification settings - Fork 20
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
Unify backends #20
Unify backends #20
Conversation
@@ -2,17 +2,9 @@ | |||
"cells": [ | |||
{ | |||
"cell_type": "code", | |||
"execution_count": 1, | |||
"execution_count": 17, |
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.
Is this intentional?
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.
Not intentional. I guess these lines are autogenerated when we run the jupyter notebook!
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.
Just a minor comment.
Thanks @traversaro! :) |
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.
Looks good also to me!
This PR should remove duplicate code relative to Jax and PyTorch backends.
I implemented several classes that wrap every data type, overriding several methods.
https://github.com/ami-iit/ADAM/blob/unify-backends/src/adam/core/spatial_math.py and implements spatial math methods, inheriting for an
ArrayLike
abstract class.The methods of
ArrayLike
are then implemented inCasadiLike
,JaxLike
, etc, and used in the main class that implements rigid-body algorithms.Fixes #5