RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.35k stars 1.27k forks source link

plant->WeldFrames(body_frame, plant->world_frame(), ...) produces a mysterious error #10224

Open RussTedrake opened 5 years ago

RussTedrake commented 5 years ago

calling WeldFrames(world_frame, body_frame, ... ) works fine. calling WeldFrames(body_frame, world_frame, ...) results in the Finalize call trying to add a second mobilizer to that pair inside the AddQuaternionFreeMobilizerToAllBodiesWithNoMobilizer, which results in a the message:

      throw std::runtime_error(
          "This multibody tree already has a mobilizer connecting these two "
          "bodies. More than one mobilizer between two bodies is not allowed");

I had to dig in in debug mode to realize what I had done wrong. Based on the documentation of the WeldFrames method, I would expect that either call should produce a valid outcome.

Also, it would be way more helpful if the error messages gave the names (or at least indices) of the offending bodies.

amcastro-tri commented 5 years ago

yes, this is work in progress. I am hopping to meet your expectations when #10068 lands.

jwnimmer-tri commented 1 year ago

This seems like it might be a duplicate of #9939?