Since RigidBodyTree
is on its way out, I'm trying to use MultibodyPlant
to study my closed loop multibody robot.
I'm testing things out using the drake/examples/simple_four_bar/FourBar.sdf
my_plant, scene_graph = AddMultibodyPlantSceneGraph(builder)
Parser(plant=my_plant).AddModelFromFile("FourBar.sdf")
But get the following error
RuntimeError: This mobilizer is creating a closed loop since the outboard body already has an inboard mobilizer connected to it. If a physical loop is really needed, consider using a constraint instead.
I'm guessing I should be using AddForceElement
to add the constraint forces as shown under Bilateral Position Constraints, is that correct?
I would further believe that DoCalcAndAddForceContribution
should implement the constraint force lambda
. However, what would be the CalcPotentialEnergy
, CalcConservativePower
, CalcNonConservativePower
?