Constraint force for closed loop MultibodyPlant

久未见 提交于 2019-12-24 21:52:07

问题


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?

来源:https://stackoverflow.com/questions/58559987/constraint-force-for-closed-loop-multibodyplant

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!