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

Drake joints should be able to create optimal F and M frames for speed #22648

Open
sherm1 opened this issue Feb 18, 2025 · 0 comments · May be fixed by #22649
Open

Drake joints should be able to create optimal F and M frames for speed #22648

sherm1 opened this issue Feb 18, 2025 · 0 comments · May be fixed by #22649
Assignees
Labels
component: multibody plant MultibodyPlant and supporting code type: performance

Comments

@sherm1
Copy link
Member

sherm1 commented Feb 18, 2025

Users specify joints by giving a frame on the parent link (Jp) and a frame on the child link (Jc), plus joint-specific info. Joints are implemented with mobilizers that use an inboard frame F and outboard frame M in the multibody tree. Currently we use Jp and Jc for F and M. This is not always the optimal choice, in which case we would be better off making up new F and M's for computation, transforming back to Jp and Jc only when needed.

Examples are:

  • Weld joints should enforce that F and M are always coincident, so that we do not have to compose X_FM during kinematics. Currently they enforce an arbitrary X_FM matching X_JpJc. A better choice of F (e.g. coincident with Jc) would make X_FM identity.
  • Pin, prismatic, and screw joints specify an axis in addition to Jp and Jc. The underlying mobilizers would be much more efficient if the axis was aligned with one of the F and M coordinate axes. In that case the axis has only one non-zero element (a 1!) and the R_FM rotation matrix has a special 2d structure where only 4 elements change.

The victory condition for this issue is that we can create and bookkeep new frames, with appropriate conversions back to Jp and Jc as necessary, with a single example implemented (say Weld), without necessarily taking advantage yet of the potential speedups.

Separate issues will be filed for special-casing more mobilizers and taking advantage of the simplifications.

This is part of the Multibody performance epic #18442

@sherm1 sherm1 added component: multibody plant MultibodyPlant and supporting code type: performance labels Feb 18, 2025
@sherm1 sherm1 self-assigned this Feb 18, 2025
@sherm1 sherm1 moved this to In Progress in #dynamics (Drake board) Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: multibody plant MultibodyPlant and supporting code type: performance
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant