使用MultibodyPlant时,为什么会得到`SolveQuadraticForTheSmallestPositiveRoot():condition'Delta> 0'失败`? [英] With MultibodyPlant, why do I get `SolveQuadraticForTheSmallestPositiveRoot(): condition 'Delta > 0' failed`?
问题描述
(这是来自 Drake Slack对话.)
我正在玩爆炸IIWA"演示,以使用MultibodyPlant
和SceneGraph
制作一些工作流程的原型.基本上,我只是添加具有关节(多个链接之间的旋转关节)的机械手,然后从高处放下机械手.当达到某个点时,我想暂停仿真,删除所有关节,然后继续仿真.
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.
这是我正在使用的代码(目前需要一些Drake PR才能进行二进制构建):
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
但是,当我尝试所有关节并进行仿真时,我从Drake的 TAMSI规划求解中得到了以下断言:
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如果我只是用速度去除碰撞和速度,这就是模拟的样子:
FTR This is what the simulation looks like if I just remove the collisions and futz with the velocities:
推荐答案
来自Sherm的答案:
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:
不进行碰撞消除/速度攻击(不像惯性+碰撞看起来不是很大,但这是朝正确方向迈出的一步)的样子:
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):
这篇关于使用MultibodyPlant时,为什么会得到`SolveQuadraticForTheSmallestPositiveRoot():condition'Delta> 0'失败`?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!