With MultibodyPlant, why do I get `SolveQuadraticForTheSmallestPositiveRoot(): condition 'Delta > 0' failed`?

我与影子孤独终老i 提交于 2020-05-29 09:53:08

问题


(This is from a Drake Slack conversation.)

I'm playing with an "exploding IIWA" demo to prototype some workflows with MultibodyPlant and SceneGraph. Basically, I'm just adding a robot arm that has articulation (revolute joints between multiple links) and dropping the robot arm from a height. When it hits a certain point, I want to pause the simulation, remove all of the joints, and the resume the simulation.

Here is the code that I am working with (which needs some Drake PRs at present to work off of a binary build):

multibody_plant_subgraph_test.py

However, when I try all of the joints and simulate, I get the following assertion from Drake's TAMSI Solver:

  File ".../common/test/multibody_plant_subgraph_test.py", line 345, in do_falling_exploding_sim
    simulator_new.AdvanceTo(2.)
SystemExit: Failure at external/drake/multibody/plant/tamsi_solver.cc:217 in SolveQuadraticForTheSmallestPositiveRoot(): condition 'Delta > 0' failed.

Any ideas as to why this happens?

FTR This is what the simulation looks like if I just remove the collisions and futz with the velocities:


回答1:


From Sherm's answer:

Do you have any massless or inertialess bodies in there? Those are OK as long as they are interior to a multibody tree, but not as terminal nodes. After you remove the joints all the bodies are terminal.

This ended up being the case. I just needed to make sure that I removed all massless bodies in this case, and everything worked:

commit with relevant change

What it looks like without doing the collision removal / velocity hacks (inertia + collisions look not so great, but it's a step in the right direction):



来源:https://stackoverflow.com/questions/62035674/with-multibodyplant-why-do-i-get-solvequadraticforthesmallestpositiveroot-c

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