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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2007-03-15T10:31:16+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-03-15T10:31:16+00:00</updated>

		<published>2007-03-15T10:31:16+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3901#p3901</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3901#p3901"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3901#p3901"><![CDATA[
Cool!<br><br>Just two small points:<br><br>a) I am sure you know that, but you can also build the universal and hinge using the above formulas. For each axis you want to constaint find the tangent plane and require that the dot product becomes zero<br><br>b) In order to boost performance you should solve 1D and 3D linear and angular atoms. So for example for a universal you solve a 3D linear constraint (actually a point-point) and one angular constraint atom. Or for the fixed joint you can solve the 3D linear and angular atoms. This is faster than solving systems of higher dimensions with the same stability and can also be nicely implemented using SIMD<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> — Thu Mar 15, 2007 10:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2007-03-14T23:11:49+00:00</updated>

		<published>2007-03-14T23:11:49+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3895#p3895</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3895#p3895"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3895#p3895"><![CDATA[
I found the problem. It was in my 6x12 matrix class. I'm sorry to have wasted your time, it's working wonderfully now!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Wed Mar 14, 2007 11:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2007-03-14T22:58:42+00:00</updated>

		<published>2007-03-14T22:58:42+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3894#p3894</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3894#p3894"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3894#p3894"><![CDATA[
I don't think I did. Take a look at the second line of the <strong class="text-strong">Impulse:</strong> section.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Wed Mar 14, 2007 10:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-03-14T21:54:02+00:00</updated>

		<published>2007-03-14T21:54:02+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3893#p3893</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3893#p3893"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3893#p3893"><![CDATA[
I think you missed to transform the velocity:<br><br>v_rel = J * v<br><br>where <br><br>v = ( vA, wA, vB, wB ) = ( vA, wA, 0, 0 )  <br><br>Read wA = omega of A <br><br>Let me know if this works then for you.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Wed Mar 14, 2007 9:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2007-03-14T20:35:39+00:00</updated>

		<published>2007-03-14T20:35:39+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3891#p3891</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3891#p3891"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3891#p3891"><![CDATA[
I'm just working on a single body scenario right now.<br><br><strong class="text-strong">On setup:</strong><br>RAI = bodyA-&gt;get_rotation_matrix_inverse ();<br>Roff = bodyA-&gt;get_position ();<br>uA = RAI * UNIT_X;<br>vA = RAI * UNIT_Y;<br>wA = RAI * UNIT_Z;<br>uB = UNIT_X;<br>vB = UNIT_Y;<br>wB = UNIT_Z;<br><br><strong class="text-strong">Pre impulse:</strong><br>RA = bodyA-&gt;get_rotation_matrix ()<br>uAW = RA * uA<br>vAW = RA * vA<br>wAW = RA * wa<br>uBW = uB<br>vBW = vB<br>wBW = wB<br><br>T1 = uAW.cross(vBW);<br>T2 = uAW.cross(wBW);<br>T3 = vAW.cross(wBW);<br><div class="codebox"><p>Code: </p><pre><code>J = [I | 0      | 0 | 0     0 | T1,2,3 | 0 | 0 ]</code></pre></div>T1,2,3 are laid out in rows<br>I and 0 are 3x3<br>K = J * W * JT<br>KI = K^-1<br><br>B[0..2] = Roff - bodyA-&gt;get_position()<br>B[3] = uAW.dot(vBW);<br>B[4] = uAW.dot(wBW);<br>B[5] = vAW.dot(wBW);<br><br>P = accumulated_impulse * J<br>apply P<br><br><strong class="text-strong">Impulse:</strong><br>v = [BodyA velocities | 0]<br><br>baum = beta * B - (J * v)<br><br>lambda = KI * baum<br>old_lambdas = accumulated_lambdas<br>accumulated_lambdas += lambda<br>lambda = accumulated_lambda - old_lambdas<br><br>P = lambda * J<br>apply P<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Wed Mar 14, 2007 8:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-03-14T19:39:24+00:00</updated>

		<published>2007-03-14T19:39:24+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3890#p3890</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3890#p3890"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3890#p3890"><![CDATA[
Can you post some pseudo code of what you do?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Wed Mar 14, 2007 7:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2007-03-14T19:33:41+00:00</updated>

		<published>2007-03-14T19:33:41+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3889#p3889</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3889#p3889"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3889#p3889"><![CDATA[
Hey,<br><br>I have done some bug fixing and now the joint is working correctly with no stabalization.<br><br>With stabalization one of the axis settles (incorrectly) and then the joint spins around that axis for ever in a pulsing fashion.<br><br><br>Any suggestions?<br><br>Thaks.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Wed Mar 14, 2007 7:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2007-03-09T01:48:21+00:00</updated>

		<published>2007-03-09T01:48:21+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3807#p3807</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3807#p3807"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3807#p3807"><![CDATA[
<blockquote class="uncited"><div>This looks correct.<br><br>The Jacobians schould have the following form:<br><br>J_linear    = ( I3  -R1  -I3  R2 )<br>J_angular = ( 0  T  0  -T ) </div></blockquote>This is what I have. Except I'm fixing a single body at it's origin.<br>So R1, R2 are zero.<br><blockquote class="uncited"><div>I3 is the identity and R1 ist the skew matrix for r1 (the lever arm from the COM to the anchor point) and R2 the same for body 2. T is the matrix holding you t_i computations in its rows. So I assume for beta you use 0.1 / dt and dt fixed at 60Hz. </div></blockquote>My beta is 0.2 / dt and dt is fixed at 60hz.<br><blockquote class="uncited"><div>My next question is how you relax the system. You have basically three options to solve the 6x6 system:<br><br>a) You solve each row individually ( this is basically PGS )<br>b) You solve the linear and angular constraint en block. This is solving two 3x3 system and this is what I would recommend<br>c) You solve the whole system directly what means to solve a 6x6 system.</div></blockquote>I use c). I invert K once and use K^-1 for all future calculations.<br><blockquote class="uncited"><div>Does you system explode or does it only move a little. In order to debug this stuff you can deactivate the stabilization (set it zero) and use a smaller timestep. Then also check the signs of your stabilization.</div></blockquote>The system just moves a little bit, but it never stops. I've deactivated stabilization and switched to 120Hz and it is no better. The signs of my stabilization depend on which direction the body is starting to rotate in. So they vary between negative and positive.<br><br>Thanks for your help!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Fri Mar 09, 2007 1:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2007-03-07T17:45:49+00:00</updated>

		<published>2007-03-07T17:45:49+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3784#p3784</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3784#p3784"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3784#p3784"><![CDATA[
This looks correct.<br><br>The Jacobians schould have the following form:<br><br>J_linear    = ( I3  -R1  -I3  R2 )<br>J_angular = ( 0  T  0  -T ) <br><br><br>I3 is the identity and R1 ist the skew matrix for r1 (the lever arm from the COM to the anchor point) and R2 the same for body 2. T is the matrix holding you t_i computations in its rows. So I assume for beta you use 0.1 / dt and dt fixed at 60Hz. <br><br>My next question is how you relax the system. You have basically three options to solve the 6x6 system:<br><br>a) You solve each row individually ( this is basically PGS )<br>b) You solve the linear and angular constraint en block. This is solving two 3x3 system and this is what I would recommend<br>c) You solve the whole system directly what means to solve a 6x6 system.<br><br>Does you system explode or does it only move a little. In order to debug this stuff you can deactivate the stabilization (set it zero) and use a smaller timestep. Then also check the signs of your stabilization.<br><br>PM me your e-mail address and I send you the Barthenbrug thesis.<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> — Wed Mar 07, 2007 5:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[John McCutchan]]></name></author>
		<updated>2007-03-07T03:33:36+00:00</updated>

		<published>2007-03-07T03:33:36+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3776#p3776</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3776#p3776"/>
		<title type="html"><![CDATA[Angular error with fixed joint]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3776#p3776"><![CDATA[
Thanks Dirk! You are always so helpful.<br><blockquote class="uncited"><div>dC1/dt = ( omega1 x u1 ) * v2 + u1 * ( omega2 * v2 )</div></blockquote>I assume you meant omega2 x v2.<br><br><br>I worked out the jacobian on paper and after a bunch of simplifying this is what I got:<br><br>Assuming that u1,v1,v2,w2 have been rotated into world space from their respective body space.<br><br>t1 = u1 x v2<br>t2 = u1 x w2<br>t3 = v1 x w2<br><br>The jacobians would then be:<br><br>J1A = [  t1,  t2,  t3 ]^T<br><br>J2A = [ -t1, -t2, -t3 ]^T<br><br>B1 = beta * u1.v2<br>B2 = beta * u1.w2<br>B3 = beta * v1.w2<br><br>I implemented this and it's working just as well as the old relative orientation method was.<br>So, if you see anything wrong with my derivation I'd appreciate your help. Could you point me<br>to Barthenbrug's thesis, I googled but couldn't find it.<br><br>Thanks<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=148">John McCutchan</a> — Wed Mar 07, 2007 3:33 am</p><hr />
]]></content>
	</entry>
	</feed>
