Skip to content
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

Implement CRBA with jax.lax.scan #14

Merged
merged 1 commit into from
Sep 21, 2022
Merged

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Sep 20, 2022

This PR implements the CRBA algorithm with jax.lax.scan, with two main benefits:

This goes also in the direction of #12. Unfortunately, as it was already clear, the readability of the algorithm is affected by the switch.

CRBA Algorithm

Screenshot_20220920_153145

Here below a summary of the new CRBA performance compared to the previous implementation:

Model name DoFs JIT time JIT time speedup Runtime Runtime speedup
panda 9 1.35 s x3.7 569 µs x1.01
iCubGazeboV2_5 32 5.67 s x7 1.17 ms x1.01

The JIT time is now much lower than before. Instead, the runtime didn't change.

@diegoferigo diegoferigo self-assigned this Sep 20, 2022
@diegoferigo diegoferigo mentioned this pull request Sep 20, 2022
6 tasks
@diegoferigo diegoferigo merged commit a218f5e into main Sep 21, 2022
@diegoferigo diegoferigo deleted the feature/crba_with_jax.lax.scan branch September 21, 2022 08:58
@diegoferigo diegoferigo linked an issue Jun 30, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize compilation time of CRBA
2 participants