-
Notifications
You must be signed in to change notification settings - Fork 9
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
Enhance ABA-based FD computation by adding motor dynamics #45
Conversation
Do you have some reference for the math implemented? In particular, I was a bit mislead by the title "adding motor dynamics", as in the code it does not seem that any new state is added to the simulated dynamic system. |
The problem formalization and the related pseudocode can be found at https://github.com/ami-iit/element_rl-for-codesign/issues/61#issuecomment-1658609058. The title refers to the fact that this ABA implementation takes into account motor inertias, viscous friction and transmission ratio. I can change the title to "Enhance ABA-based FD computation by considering motor parameters" if that makes things more clear |
No problem, once you clarify it in the description I think it is ok! |
3836a3c
to
a43274e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
b2e7343
to
551fc7d
Compare
xref of this interesting comment full of references ROAM-Lab-ND/spatial_v2_extended#6 (comment), we might have a deeper look at it (original issue ROAM-Lab-ND/spatial_v2_extended#5). |
c87ca07
to
b0657e7
Compare
ec3d4a1
to
5078b36
Compare
Changing the base branch to |
3ebcaad
to
fb61a64
Compare
fb61a64
to
a974ea5
Compare
8ab569d
to
408c9e1
Compare
a466981
to
1009885
Compare
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.
First round of review, it looks good even if I still have some doubts on the updated ABA and RNEA algorithms. If we want to merge into main
and the new methods are not yet 100% tested and benchmarked, let's consider to commit them for the time being as aba_motors.py
and rnea_motors.py
. We can fix the remaining problems in the future without affecting current functionality.
vJ = S[i] * qd[ii] * (qd.size != 0) | ||
m_vJ = m_S[i] * qd[ii] * (qd.size != 0) |
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.
Did you validate jit compilation? I remember I had to use the if/else statement in this way otherwise jax was complaining
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.
Yes, it did not complain, but we can further investigate on this
Also this has been closed once merged |
This pull request introduces the possibility for the simulator to accept motor inertia, motor viscous friction and gear ratio, which will be saved in the already existing JAX dataclasses:
high_level.joint
high_level.model
model.physics_model
to be ready for Forward Dynamics computation through a new ABA version which incorporates these motor parameters into the simulation process.
As of now, the PR is marked as a draft since even though it successfully passes the tests against iDynTree, it requires further validation with comprehensive motor dynamics to ensure its robustness and accuracy.
C.C. @diegoferigo @CarlottaSartore @S-Dafarra @traversaro