-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use link/joint terminology consistently in MultibodyPlant #11266
Comments
BTW the CAD world uses "part" which is a nicer word than "link". Andy Ruina says we should use "object" (I don't think he knows about OOP :) |
I love this proposal in terms of consistency and delineating the physical modeling objects from the mathematical modeling objects. However, I can't say that I love the current suggested solution:
I think this would also mean renaming My issue with reflecting this in I'd feel much more at peace with initiating API transitions if:
Specifically on the delineation between |
Per discussion with @sherm1, @mitiguy and @EricCousineau-TRI today:
That is, per today's discussion we settled on |
BTW in case you need an abbreviation for |
IIRC @sherm1 decided on a different solution path here -- using "mobod" internally but not renaming the MbP API. |
Our most common input formats, .sdf and .urdf use the terms "link" and "joint" to describe the topology of a multibody system. That can include topological loops, rigid groupings of welded-together links, static links, free objects, etc. The input to Drake's MultibodyPlant is intended to represent that in a straightforward way. However, although MBP uses "joint" consistently with sdf it uses the term "body" (e.g.
AddBody()
) to mean "link". I'm not sure there was ever a good reason to do that but it is the term we started with and it didn't cause any trouble initially.Internally, we need to create a model of the input system that includes a spanning tree plus constraints. Links can be split into multiple "bodies" and joints are implemented using "mobilizers" (generating differential equations) or constraints (generating algebraic equations). As we improve Drake's modeling capability, the distinctions between the input graph and modeled tree+constraints system will increase. In many cases that's invisible to API users who can just work with the original abstractions. However, internally and for many users we need to be able to communicate and think clearly about the distinction between the input topology and the generated model. This is coming up now because we are beginning to formalize input graph and tree introspection (e.g. see PRs #11257 and #10068).
We use the term "mobilizer" internally as a term of art to distinguish tree-model joints from input joints and that has been very helpful. I propose that we reserve "body" for the tree system and take advantage of Robotics' "link" term of art (and compatibility with sdf) to distinguish links as specified by users from the bodies we use to model them. That makes it easy to talk about the fact that there may be multiple bodies used to represent a single link (in the case of topological loops) or multiple links modeled as a single body (in the case of welded-together groupings).
In practical terms, this just means changing
MBP::AddBody()
toMBP::AddLink()
and fixing some comments. The previous name can be left as a synonym with no harm, and eventually deprecated.Thoughts?
cc @amcastro-tri @EricCousineau-TRI @RussTedrake @avalenzu @mitiguy
The text was updated successfully, but these errors were encountered: