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

Simplify CRBA by merging two jax.lax.cond branches #236

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Sep 19, 2024

This change doesn't significantly affect speed, but it simplifies the logic that implements a nested while loop with a jax.lax.scan -- necessary to support reverse-mode AD.

I have the impression that we can remove entirely this while loop by slicing the mass matrix with $\nu(i)$, that defines the bodies supported by joint $i$, as @flferretti is trying in #231, but I didn't investigate further in this direction.


📚 Documentation preview 📚: https://jaxsim--236.org.readthedocs.build//236/

@diegoferigo diegoferigo self-assigned this Sep 19, 2024
Copy link
Collaborator

@flferretti flferretti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot Diego, LGTM!

@diegoferigo diegoferigo merged commit df28248 into main Sep 19, 2024
25 checks passed
@diegoferigo diegoferigo deleted the update_crba branch September 19, 2024 08:01
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.

2 participants