<?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/1065" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2007-03-21T01:26:11+00:00</updated>

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

		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2007-03-21T01:26:11+00:00</updated>

		<published>2007-03-21T01:26:11+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3973#p3973</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3973#p3973"/>
		<title type="html"><![CDATA[trouble with 3D split impulses]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3973#p3973"><![CDATA[
I found the problem, and it had nothing to do with my code. My body space inverse inertia tensor was wrong. I used the closed form solution for the diagonal inertia tensor for a cube, but I forgot to scale by the mass before inverting it. So the angular impulses weren't being scaled properly.<br><br><br>Also, I found upping the depth slop from 0.01 to 0.1 had a huge impact.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Wed Mar 21, 2007 1:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-03-19T10:14:55+00:00</updated>

		<published>2007-03-19T10:14:55+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3943#p3943</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3943#p3943"/>
		<title type="html"><![CDATA[trouble with 3D split impulses]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3943#p3943"><![CDATA[
Conceptually it looks correct what you do, so the only thing I can think of is that you forget to clear the velocities or impulses. Maybe a typo somewhere or you mix accidently the bias impulse with the normal impulse. I would say that it is something trivial that you maybe overlook at the moment...<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Mon Mar 19, 2007 10:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2007-03-19T00:26:14+00:00</updated>

		<published>2007-03-19T00:26:14+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3942#p3942</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3942#p3942"/>
		<title type="html"><![CDATA[trouble with 3D split impulses]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3942#p3942"><![CDATA[
Re Dirk:<br>I don't think it's a sign issue because I'm using the same signs as I do when I'm not using splitting.<br><br>Re Erin:<br>I am setting the bias impulse to zero in <strong class="text-strong">PreImpulse</strong> and I'm setting<br>the velocities to zero in <strong class="text-strong">Position Integration</strong>.<br><br>Any other suggestions guys? I'm really baffled.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Mon Mar 19, 2007 12:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erin Catto]]></name></author>
		<updated>2007-03-19T00:07:01+00:00</updated>

		<published>2007-03-19T00:07:01+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3941#p3941</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3941#p3941"/>
		<title type="html"><![CDATA[trouble with 3D split impulses]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3941#p3941"><![CDATA[
Be sure to initialize the bias impulses and velocities to zero before each time step. Test the solver with a sphere on a plane and look at the values in the debugger.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12">Erin Catto</a> — Mon Mar 19, 2007 12:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-03-18T18:59:29+00:00</updated>

		<published>2007-03-18T18:59:29+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3936#p3936</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3936#p3936"/>
		<title type="html"><![CDATA[trouble with 3D split impulses]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3936#p3936"><![CDATA[
When you split the impulse you basically have<br><br>Velocity impulse:<br>P = -invK * (J * v)<br><br>Position impulse:<br>P = -invK * 0.1 * C / dt<br><br>When you use Baumgarte stabilization you combine the relative velocity at the joint (J * v) with the position error at the joint ( C ). This effects the momentum. What you want is that the stabilization doesn't effect the momentum so you cirvcumvent this by splitting up the impulse into a velocity correcting and (pseudo) position correcting impulse. Note that from experience the splitted impulse seems only to work nice with contacts, but not with joints. <br><br>Another thing to understand is that the position constraint is non-linear ( e.g. C = u1 * v2 ) so when you add the bias tem 0.1 * C / dt you linearize the position constraint what opens the door to inaccurecies.<br><br>Hmm, from skimming over your code I can't see the error, maybe only a sign. Did you try -erp * B?<br><br><br>Cheers,<br>-Dirk<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Sun Mar 18, 2007 6:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2007-03-18T17:46:55+00:00</updated>

		<published>2007-03-18T17:46:55+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3934#p3934</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3934#p3934"/>
		<title type="html"><![CDATA[trouble with 3D split impulses]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3934#p3934"><![CDATA[
I have a working 3D version of sequential impulses. I can have 10 cubes stacked directly on top of each<br>other be stable with only 10 iterations. This is with a erp = 0.2 * fps (fps = 60). I have started<br>to experiment with splitting the penetration depth correction impulses and I'm not getting good results.<br>The simulation becomes very jittery with the cubes tilting back and forth and settling into each other. <br>The instability seems to be coming from the angular movement. Has anyone experienced these kinds of<br>problems with 3D split impulses. Bullet doesn't use split impulses, is this just not implemented or<br>was it found to be problematic? I'm going to post my pseudo code below if anyone notices a problem.<br><br><br><strong class="text-strong">PreImpulse:</strong><div class="codebox"><p>Code: </p><pre><code>bias_normal_lambda = 0.0;B = depth - DEPTH_SLOP;B = B &lt; 0.0 ? 0.0 : B;P = J * accumulated_normal_lambdaapply P</code></pre></div><strong class="text-strong">Impulse:</strong><br><div class="codebox"><p>Code: </p><pre><code>V = non-bias-velocity of both bodieslambda = K^-1 * (-( J * v))old_lambda = accumulated_normal_lambdaaccumulated_normal_lambda += lambdaaccumulated_normal_lambda = accumulated_normal_lambda &lt; 0.0 ? 0.0 : accumulated_normal_lambdalambda = accumulated_normal_lambda - old_lambdaP = J * lambdaapply P to non-bias velocityV = bias-velocity of both bodiesbias_lambda = K^-1 * (-(J * V) + erp * B)old_bias_lambda = bias_normal_lambdabias_normal_lambda += bias_lambdabias_normal_lambda = bias_normal_lambda &lt; 0.0 ? 0.0 : bias_normal_lambdabias_lambda = bias_normal_lambda - old_bias_lambdaP = J * bias_lambdaapply P to bias velocity</code></pre></div><strong class="text-strong">Position Integration code:</strong><div class="codebox"><p>Code: </p><pre><code>lv = linear_velocity + bias_linear_velocityav = angular_velocity + bias_angular_velocity...bias_linear_velocity = 0.0bias_angular_velocity = 0.0</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Sun Mar 18, 2007 5:46 pm</p><hr />
]]></content>
	</entry>
	</feed>
