<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/8886" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2013-03-09T03:37:49+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/8886</id>

		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2013-03-09T03:37:49+00:00</updated>

		<published>2013-03-09T03:37:49+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30214#p30214</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30214#p30214"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30214#p30214"><![CDATA[
The bias impulse adds extra velocity indeed. You should not use a Baumgarte factor beta &gt; 0.2. Personally I only use 0.1.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Sat Mar 09, 2013 3:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[c0der]]></name></author>
		<updated>2013-03-08T05:19:50+00:00</updated>

		<published>2013-03-08T05:19:50+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30204#p30204</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30204#p30204"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30204#p30204"><![CDATA[
Thanks Dirk, I have done that, but it makes no impact.<br><br>The bias impulse seems to be adding the extra bounce, I will look into it and post my solution when I find the problem<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9431">c0der</a> — Fri Mar 08, 2013 5:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2013-03-05T17:17:01+00:00</updated>

		<published>2013-03-05T17:17:01+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30176#p30176</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30176#p30176"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30176#p30176"><![CDATA[
A crucial point for stacking stability is to allow for some penetration. Otherwise you loose contact points and warmstarting information. Make sure you don't resolve the full penetration, but add the linear slob. <br><br>Say you have a penetration of -0.01. You want to resolve -0.01 + LINEAR_SLOB. If the penetration is above -LINEAR_SLOP you clamp to zero.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Tue Mar 05, 2013 5:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[c0der]]></name></author>
		<updated>2013-03-05T07:53:30+00:00</updated>

		<published>2013-03-05T07:53:30+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30175#p30175</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30175#p30175"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30175#p30175"><![CDATA[
I am stacking 10 boxes, I match the contacts by comparing the two edges making them up in the manifold. I use the algorithm from Box2D Lite to store the old impulses with the new contact data. I will look into it based on what you told me the iterations should be, and try to get the boxes stable at 10 iterations as Box2D Lite does<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9431">c0der</a> — Tue Mar 05, 2013 7:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2013-03-04T21:01:37+00:00</updated>

		<published>2013-03-04T21:01:37+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30174#p30174</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30174#p30174"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30174#p30174"><![CDATA[
How do you match the contact points between frames? A stack of 5 boxes should be stable at 8 iterations, probably even at 5 (with some initial bounces).<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Mon Mar 04, 2013 9:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[c0der]]></name></author>
		<updated>2013-03-04T11:42:41+00:00</updated>

		<published>2013-03-04T11:42:41+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30170#p30170</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30170#p30170"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30170#p30170"><![CDATA[
After a thorough test, 1-9 iterations is unstable<br><br>10 is stable<br>11 has a slight bounce but is stable<br>12 causes collapse<br><br>It seems like floating point error or the extra contacts are problematic<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9431">c0der</a> — Mon Mar 04, 2013 11:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[c0der]]></name></author>
		<updated>2013-03-04T11:34:47+00:00</updated>

		<published>2013-03-04T11:34:47+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30169#p30169</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30169#p30169"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30169#p30169"><![CDATA[
I am currently getting a stable stack when dropping boxes from 1m apart at 25 iterations with contact caching. Any iterations below/above that causes the stack to collapse. However starting the boxes off close together keeps the stack stable.<br><br>I assume this is a problem with the clipping algorithm when it generates more than 4 contacts when clipping against the side planes and not the face plane. In Box2D it's easier to achieve stability as there are 2 contacts at most. Does bullet clip against the face plane?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9431">c0der</a> — Mon Mar 04, 2013 11:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2013-02-22T18:16:57+00:00</updated>

		<published>2013-02-22T18:16:57+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30080#p30080</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30080#p30080"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30080#p30080"><![CDATA[
This sounds right. IIRC the ODE clips ( or clipped ) against the reference plane, but Box2D does not. Personally I never clipped against the reference face, so I cannot tell the difference.<br><br>Here is another thing regarding friction I forgot yesterday. Since you use the relative velocity to build you tangent frame you directions change frequently. You need to project your old friction impulse onto the new axes. Here is how you can do this:<br>Vector3 friction = lambda1 * old_tangent1 + lambda2 * old_tangent2 // here lambda1 and lambda2 are the accumulated friction impulses<br>lambda1 = dot( friction, new_tangent1 );<br>lambda2 = dot( friction, new_tangent2 );<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Fri Feb 22, 2013 6:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[c0der]]></name></author>
		<updated>2013-02-22T10:48:05+00:00</updated>

		<published>2013-02-22T10:48:05+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30078#p30078</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30078#p30078"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30078#p30078"><![CDATA[
For anyone who is interested, just as I was about to give up, I thought of something that fixed the problem to an extent:<br><br>1) Increase the thickness of the clipping planes by increasing the plane epsilon to 10^-2 (after experimenting with various epsilon values). <br>2) DO not clip against the face plane (normal pointing inside the clipping OBB), but rather just discard points that are on the wrong side of the plane. Use the penetration depths retrieved from the separating axis test, which is the same penetration depth for all contacts. Since I was using the distance of each contact point to the face plane to get the penetration depths, this caused jittery behaviour when stacking 6 boxes and the stack fell.<br><br>Now I can stack 15 boxes at 30 iterations, 10 boxes at 10 iterations with no problems. I don't know if this is a good result but it's the best I can do so far, hope that helps anyone experiencing the same problems<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9431">c0der</a> — Fri Feb 22, 2013 10:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[c0der]]></name></author>
		<updated>2013-02-22T04:03:31+00:00</updated>

		<published>2013-02-22T04:03:31+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30075#p30075</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30075#p30075"/>
		<title type="html"><![CDATA[Re: Sequential impulses and warm starting]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=30075#p30075"><![CDATA[
Tuning the bias factor didn't do anything.<br><div class="codebox"><p>Code: </p><pre><code>m_cdContactData.contacts[i].bias = k_biasFactor / dt * AMG3D_MATH_MAX(0.0f, m_cdContactData.contacts[i].sPenetrationDepth - k_allowedPenetration);</code></pre></div>I calculate the bias above where the penetration depth is +ve and the allowed penetration is 0.01, with a bias factor of 0.2<br><br>I ran a test as follows:<br><br>Let 5 boxes fall onto each other (they keep bouncing up and down with spongy contact), then I disable the bias and the normal impulse converges. Perhaps I am not supposed to add the bias impulse to the warm starting impulse for the next frame? <br><br>All I can find on the internet is code to make the box stack sleep when the velocity is below a threshold, but I want to achieve stability first before masking the problem. The faster the impulse converges, the sooner the body is put to sleep.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=9431">c0der</a> — Fri Feb 22, 2013 4:03 am</p><hr />
]]></content>
	</entry>
	</feed>
