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

mbp: Errors about redundant / reversed weld joints should provide more information #9939

Open
EricCousineau-TRI opened this issue Nov 5, 2018 · 7 comments
Assignees
Labels
component: multibody plant MultibodyPlant and supporting code priority: low type: usability When a feature is awkward, confusing, or undiscoverable

Comments

@EricCousineau-TRI
Copy link
Contributor

Ran into a case where an IIWA SDF had a world-weld joint, but we accidentally added a secondary / redundant weld.

The error message from MultibodyTreeTopolgoy is verbose, but doesn't point to the frames in question (which is honestly the most useful information).

The easiest solution is to print out the frame index, and instruct the user to use get_frame(index).name() to figure out the user-friendly bits.

@EricCousineau-TRI EricCousineau-TRI self-assigned this Nov 5, 2018
@EricCousineau-TRI EricCousineau-TRI changed the title mbp: Errors about weld joints should provide more information mbp: Errors about redundant weld joints should provide more information Nov 5, 2018
@sherm1 sherm1 added component: multibody plant MultibodyPlant and supporting code priority: low and removed priority: medium labels May 12, 2020
@EricCousineau-TRI
Copy link
Contributor Author

EricCousineau-TRI commented Nov 5, 2020

@hongkai-dai ran into this recently:
Slack: https://drakedevelopers.slack.com/archives/C2WBPQDB7/p1604601033080200

I tried to construct a pendulum using Pendulum.urdf https://github.com/RobotLocomotion/drake/blob/master/examples/pendulum/Pendulum.urdf. I found I can call plant.WeldFrames(plant.world_frame(), plant.GetFrameByName("base")), but if I reverse the order of the two frames as plant.WeldFrames(plant.GetFrameByName("base"), plant.world_frame()), then I got the error

    plant.Finalize()
RuntimeError: This multibody tree already has a mobilizer connecting these two frames. More than one mobilizer between two frames is not allowed

I am wondering if plant.WeldFrames(A, B) has enforced that if A, B are adjacent links, then A has to be the parent of B?

(less verbose, but still a bit obtuse for world welding / parent-child mismatch?)

I won't be able to address this - @amcastro-tri I'm assigning to ya, but if you don't think it's actionable, feel free to close!

@EricCousineau-TRI EricCousineau-TRI changed the title mbp: Errors about redundant weld joints should provide more information mbp: Errors about redundant / reversed weld joints should provide more information Nov 5, 2020
@sherm1
Copy link
Member

sherm1 commented Nov 6, 2020

Related: #13040

@EricCousineau-TRI
Copy link
Contributor Author

Running into this again in Anzu; in this case, doing a dual-arm setup, and I'm playing with how I glue stuff together (topology) to make calibration (touch-point) a bit simpler for readers to digest.

\cc @siyuanfeng-tri

@amcastro-tri
Copy link
Contributor

Thanks Eric. cc'ing @joemasterjohn since eventually we'll clean up the whole tree vs model topology.

@sherm1
Copy link
Member

sherm1 commented Jun 21, 2022

Closing this -- #17429 is close enough.

@sherm1 sherm1 closed this as completed Jun 21, 2022
@jwnimmer-tri
Copy link
Collaborator

Eric's original post (and the follow-up posts) were about adding two welds, where the complaint is that the second weld is redundant. #17429 is about welding to the middle of a model, which is a different exception path. They don't seem like the same issue to me?

@sherm1
Copy link
Member

sherm1 commented Jun 21, 2022

My thought is that if we can properly handle the analysis that leads us to use a reverse mobilizer to fix #17429 that analysis will also detect cases where we can't. But I think you're right that we should leave this open until we can verify that the error messages are tolerable.

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 priority: low type: usability When a feature is awkward, confusing, or undiscoverable
Projects
None yet
Development

No branches or pull requests

4 participants