[multibody] MakeMobilizerForJoint() can now create Frames #22649
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows a joint to choose mobilizer F and M frames that are distinct from the joint's parent and child frames Jp and Jc. Demonstrates the capability by moving the Weld mobilizer F frame to be coincident with the M frame, even if Jp and Jc are not coincident, and strips the Weld mobilizer of its ability to model the F≠M case. Requires reaction force computation to understand whether Jc and M are the same because if not the reaction force must be shifted from the origin Mo of M to the origin Jco of Jc. Reverse welds must also be accommodated.
Existing tests in multibody_plant_test.cc already look at reaction forces for a variety of welds, reversed and with a general X_JpJc. Those fail without the reaction force changes here.
This does not include
This is the first PR in a series leading to MultibodyPlant taking advantage of optimal mobilizer frame choice for faster kinematics.
Notes for Release engineer
This is a change to the
protected
Joint API (added a parameter to pure virtualMakeMobilizerForJoint()
). That only affects people who have written new Joint & Mobilizer types. If there are any non-Drake Joint extensions, they will need to add that parameter to the signature, although it can be ignored. Per our policy as stated in the Joint class header, the Jointprotected
API is subject to change without deprecation. However, we promise to note when changes have been made.Resolves #22648
This change is