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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2007-07-02T08:41:44+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-07-02T08:41:44+00:00</updated>

		<published>2007-07-02T08:41:44+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4657#p4657</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4657#p4657"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4657#p4657"><![CDATA[
W contains the global inertia tensor (a 3x3 matrix). So the W matrix is block diagonal. It contains four 3x3 matrices on its diagonal. Note that you usually don't build this matrix in memory. If you multiply J * W * JT by hand or e.g. Matlab you end up with an easy formula for your effective mass. (I do it by hand since it is really good practise).<br><br>One hint:<br>Often the result is something like this (usually four additative terms):<br>K = n1 * w1 * n1 + n2 * w2 * n2 + ...<br><br>Since length(n1) == 1 you end up with K = w1 + w2 + ...<br><br>A good exercise is to build the effective mass for a non-penetration constraint and then end up with the formula in Baraff's Siggraph course. After this I would do the same for a spherical joint (ball-socket). The result must be the same as the collision matrix K in Mirtich's PhD. Try it and come back if you have problems and I try to help. <br><br>Note:<br>w1 == inv(mass1)<br>n1 is some axis in world space, e.g. the collision normal or a hinge axis<br><br><br>HTH,<br>-Dirk<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Mon Jul 02, 2007 8:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MarkZ]]></name></author>
		<updated>2007-07-02T04:24:26+00:00</updated>

		<published>2007-07-02T04:24:26+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4655#p4655</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4655#p4655"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4655#p4655"><![CDATA[
Of course, I was thinking of W when I replied  <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed">, speaking of which leads me to another stupid question, in W do we use the local or world inverse inertia matrix for each of the bodies?<br><br>Cheers,<br>Mark.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=950">MarkZ</a> — Mon Jul 02, 2007 4:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Eternl Knight]]></name></author>
		<updated>2007-07-02T03:29:43+00:00</updated>

		<published>2007-07-02T03:29:43+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4654#p4654</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4654#p4654"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4654#p4654"><![CDATA[
If I am reading it correctly - I believe I3 is the 3x3 identity matrix.<br><br>--EK<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=413">Eternl Knight</a> — Mon Jul 02, 2007 3:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MarkZ]]></name></author>
		<updated>2007-07-02T02:19:09+00:00</updated>

		<published>2007-07-02T02:19:09+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4652#p4652</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4652#p4652"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4652#p4652"><![CDATA[
Thanks for that Dirk that clears up a lot. I was wondering what I3 is? I know it is probably going to be a diagonal matrix related to the mass of the object but I'm not sure on the exact components?<br><br>Cheers,<br>Mark.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=950">MarkZ</a> — Mon Jul 02, 2007 2:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-06-29T08:25:53+00:00</updated>

		<published>2007-06-29T08:25:53+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4625#p4625</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4625#p4625"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4625#p4625"><![CDATA[
The formula goes like this:<br><br>1) Position constraint (x := position, R := Orientation matrix, r' vector from COM to anchor in body space)<br>C(x1, R1, x2, R2) = x2 + R2 * r2' - x1 - R1 * r1' = x2 + r2 - x1 - r1 <br><br>2) Velocity constraint<br>dC/dt = J * v = v2 + w2 x r2 - v1 - w1 x r1<br><br>3) Jacobian (through inspection)<br>J = [ -I3  |  skew(r1)  |  I3  |  -skew(r2) ]<br><br><br><br>Now the algorithm:<br><br>a) We seek an impulse P...<br>v' = v + W * P<br><br>b) ...such that the post-velocities satisfy the velocity constraint...<br>J * v' = 0<br><br>c) ...also knowing the impulse direction<br>P = JT * lambda<br><br><br>Finally you get:<br>J * W * JT * lambda = - J * v -&gt; lambda = -J * v / ( J * W * JT )<br><br>Not that the effective mass matrix J * W * JT can vary between 1 x 1 and 6 x 6 for binary constraints depending on the removed number of degrees of freedom. Finally plugging in the Baumgarte term (stabilization) yields:<br><br>lambda = -( 0.1* C / dt + J * v ) / ( J * W * JT )<br><br><br>HTH,<br>-Dirk<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Fri Jun 29, 2007 8:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MarkZ]]></name></author>
		<updated>2007-06-29T08:03:28+00:00</updated>

		<published>2007-06-29T08:03:28+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4624#p4624</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4624#p4624"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=4624#p4624"><![CDATA[
Hi,<br><br>I have found the slides and code very useful it understanding rigid body systems. I have been looking at the joint implementation in the Box2D demo and am unsure how it relates to the formulas from the slides. I cannot work what method the joint is using to calculate the constraint impulse and was wondering if someone could point me in the right direction?<br><br>Cheers,<br>Mark.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=950">MarkZ</a> — Fri Jun 29, 2007 8:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2007-03-21T18:41:02+00:00</updated>

		<published>2007-03-21T18:41:02+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3983#p3983</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3983#p3983"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3983#p3983"><![CDATA[
It is a terminology issue, on page 38 of his PhD, Bart Barenbrug defines the Jacobian as:<br><br>Jacobian dC/dR as 'dependency between constraint error and restriction value (impulse/force etc).<br><br>Indeed, it is a unit-impulse method to measure the effective mass, given you know the axis/direction in the right space.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Wed Mar 21, 2007 6:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erin Catto]]></name></author>
		<updated>2007-03-21T17:45:00+00:00</updated>

		<published>2007-03-21T17:45:00+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3982#p3982</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3982#p3982"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3982#p3982"><![CDATA[
Erwin, in my tutorial I show that the Jacobian maps constraint impulses from constraint space into Cartesian space. In order to apply the test impulse (lambda) you must convert it to Cartesian space (P). This implies that you already know the Cartesian space Jacobian.<br><br>Now when we consider a joint coordinate formulation (Featherstone), we need the joint space Jacobian. Actually, what we are after is the effective mass:<br><br>effective_mass = inv(J * invM * JT)<br><br>Given the current velocity error (Cdot), the effective mass tells us how to compute lambda to send the velocity error to zero:<br><br>effective_mass * delta_Cdot = lambda<br><br>Compare the above formula to:<br><br>mass * acceleration = force<br><br>The two formulas are completely analogous, the just operate in different spaces.<br><br>To compute the effective mass we need to apply lambda in constraint space, then compute the resulting acceleration in Cartesian space, then project the result back into constraint space.<br><br>In detail, we provide a test lambda (lambda_test), then use our Cartesian space Jacobian to compute P. When then apply P to the body tree and use Featherstone's algorithm to compute the change in the joint velocities. From the change in the joint velocities we can get the change in the body velocities. We then apply the Cartesian space Jacobian to the body velocity delta to get the constraint space velocity delta (delta_Cdot_test). Then we can determine the effective mass:<br><br>effective_mass = lambda_test / delta_Cdot_test<br><br>This is a fairly involved process, but it only takes order N time. I have implemented this in a joint coordinate version of Box2D. I will release the source for this soon.<br><br>I think Barenbrug's dissertation is pushing the idea of the effective mass, but he operations with position constraints, so he computes:<br><br>effective_mass = lambda_test / delta_C_test<br><br>I'm not yet willing to operate at the position level for rigid bodies because impulses are the natural language for dealing with collisions and friction, and you still can get a reaction force (joint breaking, etc).<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12">Erin Catto</a> — Wed Mar 21, 2007 5:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2007-03-21T15:57:43+00:00</updated>

		<published>2007-03-21T15:57:43+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3980#p3980</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3980#p3980"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3980#p3980"><![CDATA[
Erin, apart from those 2 methods I think there is a 3rd popular method to compute Jacobian: <br><br>Empirical: measuring the effect of applying a unit-impulse.  It is mentioned in <a href="http://home.iae.nl/users/starcat/dynamo" class="postlink">Bart Barenbrug PhD thesis and Dynamo library</a>.<br><br>I've seen some people using this in combination with Featurestone-style constraint solving.<br><br>Have you tried that?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Wed Mar 21, 2007 3:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erin Catto]]></name></author>
		<updated>2007-03-20T17:44:45+00:00</updated>

		<published>2007-03-20T17:44:45+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3971#p3971</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3971#p3971"/>
		<title type="html"><![CDATA[GDC Tutorial '07]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3971#p3971"><![CDATA[
Normally in textbooks they ask you to compute Jacobians by computing partial derivatives. If you sit down and try to do this, you'll find that it is quite tedious. On the other hand, you get Jacobian in a simpler fashion by computing the time derivative of the position constraint and isolating the velocity terms.<br><br>So there are two methods to compute the Jacobian and I'm suggesting that one method is easier than another.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12">Erin Catto</a> — Tue Mar 20, 2007 5:44 pm</p><hr />
]]></content>
	</entry>
	</feed>
