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

Always use the link frame in body-fixed and mixed output representations of model Jacobian #167

Merged
merged 6 commits into from
Jun 4, 2024

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Jun 4, 2024

This PR superseeds #164, in view of the discussion started in #164 (comment).

After this PR:

  • Calling jaxsim.api.model.generalized_free_floating_jacobian in body-fixed and mixed output represenations always return the stacked ${}^L J_{W,L}$ and ${}^{L[W]} J_{W,L}$, respectively.
  • Since now there is some additional logic to compute the pose of the link, the function runs a bit slower than before (and cannot be worked around). This method was originally enhanced in Optimize Jacobian algorithm #121.
  • I could have refactored jaxsim.api.link.jacobian to call jaxsim.api.model.generalized_free_floating_jacobian and extract the i-th Jacobian, but the current implementation is much faster and I believe that having the logic partially duplicated might make sense in this case.
  • The references helper, by default, converts the forces in the correct frame that matches the output representation of the Jacobian so that $J^\top \mathbf{f}$ is correct. This was correct also before, but it was passing through the $B$ frame instead of the $L$ frame.

@diegoferigo diegoferigo force-pushed the fix_reference_frame_of_model_jacobian branch from eb5b327 to 9beb8c4 Compare June 4, 2024 11:20
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.

LGTM, thanks!

@diegoferigo diegoferigo merged commit 44b9aee into main Jun 4, 2024
29 checks passed
@diegoferigo diegoferigo deleted the fix_reference_frame_of_model_jacobian branch June 4, 2024 15:33
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.

None yet

3 participants