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

Compute the pose and the jacobian of the implicit frames associated to collidable points #163

Merged
merged 5 commits into from
Jun 3, 2024

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented May 31, 2024

We consider the following implicit frame associated to each collidable point:

$$C := \left({}^W \mathbf{p}_C, [L]\right)$$

where:

  • ${}^W \mathbf{p}_C \in \mathbb{R}^3$ is the position of the collidable point in world coordinates.
  • $[L]$ is the orientation frame of the parent link of the collidable point (i.e. the link it is rigidly attached to).

This PR implements the following:

  • The world-to-contact-frame transform ${}^W \mathbf{H}_C \in \text{SE}(3)$.
  • The free-floating jacobian ${}^O J_{W,C/I}$ of the contact frame, where $I$ is the input representation that should match the representation of $\boldsymbol{\nu} \in \mathbb{R}^{6+n}$, and $O$ the desired output representation.

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


# Compute the generalized velocity and the free-floating Jacobian of the frame C.
ν = data.generalized_velocity()
CL_J_WC = js.contact.jacobian(model=model, data=data, output_vel_repr=VelRepr.Mixed)
Copy link
Member

Choose a reason for hiding this comment

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

Is this correct? I was expecting it to be ${} ^{C[W]} J _{W, C}$ 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep you're right, that's the mixed velocity and I should have named the variable CW_J_WC. Thanks!

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.

Great! Thanks Diego, LGTM

src/jaxsim/api/contact.py Show resolved Hide resolved
src/jaxsim/api/contact.py Outdated Show resolved Hide resolved
Co-authored-by: Alessandro Croci <alessandro.croci@iit.it>
Co-authored-by: Filippo Luca Ferretti <filippo.ferretti@iit.it>
@diegoferigo diegoferigo merged commit f24be35 into main Jun 3, 2024
29 checks passed
@diegoferigo diegoferigo deleted the collidable_points_functions branch June 3, 2024 08:00
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

4 participants