如何“减震"在仿真中符合MultibodyPlant的接触模型? [英] How to "dampen" MultibodyPlant's compliant contact model in a simulation?

查看:106
本文介绍了如何“减震"在仿真中符合MultibodyPlant的接触模型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在修补一个简单的杂乱生成的Python脚本.

At present, I'm tinkering with a simple clutter-generation Python script.

在哪里可以找到有关如何最大程度地最小化"我希望进行模拟的工厂中的能量的信息,可能是通过阻尼" MultibodyPlant的接触模型的参数?

Where can I find information on how to best "minimize" energy in a plant that I wish to forward simulate, possibly by "damping" the parameters for MultibodyPlant's contact model?

我的愿望是能够向前模拟掉落到水槽(或垃圾箱)中的杂物,并有效地抑制动能(即不反弹),从而希望也不会进行整合僵硬的.现在,如果这是非物理"黑客,我还好.

My desire is to be able to forward simulate clutter falling into a sink (or bin), and effectively have the kinetic energy be dampened out (i.e. no bouncing), in such a way that hopefully doesn't make the integration too stiff. For now, I'm fine if this is a "non-physical" hack.

我看过以下Doxygen部分:

I have seen the following Doxygen sections:

我看到了一些更改静摩擦容限的选项(在我看来,我希望滑移较少,但是减小滑移会导致更多的断言失败?)以及时间步长(精度/刚度,在计算时间上进行权衡) ).我还没有遇到可以调整的阻尼项.

I see options for changing stiction tolerance (in my mind, I would want less slipping, but decreasing this would cause more assertion failures?), as well as time step (accuracy / stiffness, at the trade-off of computation time). I have not yet come across damping terms that I can tune.

我想到的一个选择就是只使用AdvanceTo(t + dt),然后在步骤之间执行一些简单的试探法,以去除"能量(例如,查看方向是否发生变化,并去除速度变化). .我的猜测是,如果系统仍然很僵硬,这对计算时间并没有帮助.

One option I have in mind too is to just use AdvanceTo(t + dt), and in between steps, do some simple heuristics to "remove" energy (e.g. see if there was a direction change, and strip out velocity if there was). My guess is this won't really help computation time if the system is still stiff.

有效地,该脚本只是移植了Naveen的先前库的一种形式(该库位于阁楼中,已使用RigidBodyTree)以使用MultibodyPlant:

Effectively, this script is just porting a form of Naveen's prior library (which was in the attic, used RigidBodyTree) to use MultibodyPlant:

drake@f2808c7a:attic/manipulation/scene_generation

我的目标是(通过挂钟时间)进行快速计算,以生成在一定程度上稳定"的新颖杂波场景.

My goal is to have quick computation (via wall clock time) to generate novel clutter scenes that are "settled" to a certain extent.

我有一个简单的玩具示例可以工作(我可以将对象生成并放入厨房的水槽中),但是发现为了生成对象时,其初始条件不会引起非物理行为/数值不稳定(例如,互穿对象) ),我向系统注入了过多的能量"(我将它们生成在xy平面的一个盒子中,但我沿z st隔开它们,初始配置没有穿透力.)

I have a simple toy example working (I can spawn and drop objects into a kitchen sink), but have found that in order to spawn objects where their initial conditions do not cause non-physical behavior / numeric instability (e.g. interpenetrating objects), I am injecting too much "energy" into the system (I spawn them within a box in the xy-plane, but I space them out along z s.t. the initial configuration has no penetration).

我正在用不同的方式来最小化"能量并使对象在尽可能短的计算时间内稳定下来.

I am toying with different ways to "minimize" that energy and make the objects settle with as little compute time as possible.

我已经尝试过的一些事情:

Some things I've tried briefly:

  1. 仅在非穿透性初始条件下进行正向仿真.很好,但是(可能由于兼容的接触模型中的设置)可能需要一段时间才能解决,并且/或者能量太大,物体会从水槽中反弹出来.在花点时间"部分,
  2. 使用即将发布的Anzu版本碰撞消除器,以所有对象的零高度"为起点,原始生成高度为无碰撞"状态.这是可行的,但对于大量对象(> 5)可能在计算上昂贵,并且总体上比仅使用正向仿真解决对象要慢得多.
  3. 尝试使用MinimumDistanceConstraint结合编写朴素的高度最小化MathematicalProgram.尽管可能会使用更多的调整,但速度较慢且相当脆弱. 此处为示例代码.
  1. Just forward-simulate within non-penetrating initial conditions. This is fine, but (possibly due to settings in the compliant contact model) it can take a while to settle, and/or there's so much energy that objects will bounce out of the sink. On the "take a while" part,
  2. Use the Anzu version of the-soon-to-be-published Collision Remover, with "zero-height" of all objects as the starting point, and the original spawning height as the "collision free" state. This works, but can be computationally expensive for a large number of objects (>5), and overall much slower than just using forward simulation to settle the objects.
  3. Try to write a naive height-minimizing MathematicalProgram in conjunction using MinimumDistanceConstraint. This is slow and rather brittle, though possible it could use more tuning. Example code here.

免责声明:我是TRI Anzu/Drake开发人员,但不了解Drake物理模拟设置中更复杂的部分:P

Disclaimer: I am a TRI Anzu / Drake Developer, but just ignorant of the more intricate parts of Drake's physical simulation setup :P

推荐答案

我一直认为正确"的解决方案是编写一个小的数学程序来求解不动点(静态平衡:v =v̇= 0)的问题.对于操纵器方程,当v = 0时,一堆项消失了.全局解决这个问题很难看且不凸,但是一旦您知道哪些力应该为非零(也许可以通过一点模拟),那么它就会很快.

I have always thought that the "right" solution to this is to write a small mathematical program that solves for the fixed point (static equilibrium: v=v̇=0) of the problem. For the manipulator equations, when v=0 a bunch of the terms disappear. Solving this globally is ugly and non-convex, but once you know which forces should be non-zero (perhaps by simulating a little), then it should be quite fast, I would think.

这篇关于如何“减震"在仿真中符合MultibodyPlant的接触模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆