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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2010-10-14T19:00:32+00:00</updated>

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

		<entry>
		<author><name><![CDATA[ngbinh]]></name></author>
		<updated>2010-10-14T19:00:32+00:00</updated>

		<published>2010-10-14T19:00:32+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20501#p20501</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20501#p20501"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20501#p20501"><![CDATA[
@Erwin: You're right! Thanks for correcting me on that.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=225">ngbinh</a> — Thu Oct 14, 2010 7:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2010-10-14T06:04:48+00:00</updated>

		<published>2010-10-14T06:04:48+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20497#p20497</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20497#p20497"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20497#p20497"><![CDATA[
I see. Thanks for the clarification.<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 Oct 14, 2010 6:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[silcowitz]]></name></author>
		<updated>2010-10-13T21:19:19+00:00</updated>

		<published>2010-10-13T21:19:19+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20488#p20488</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20488#p20488"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20488#p20488"><![CDATA[
Its because if some problem is to be an LCP problem, it must be on the form<br>w=Ax+b&gt;=0, x&gt;=0, w^Tx =0. <br><br>So, when we want to model the coupling between normal force magnitudes and friction force magnitudes, the only way to put that into the form of an LCP is to introduce extra variables, like Stewart and Trinkle did (they use lambda as symbol in some of the papers if I recall). When you do that, you end up with a system matrix that cannot by solved by PGS anymore. Then, someone came up with the idea of dropping the friction cone approximation from Stewart-Trinkle, and just projecting the friction forces one by one in the PGS loop. (like its done in bullet?), That showed to work out well, but it is not on the LCP form.<br><br>/morten<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1822">silcowitz</a> — Wed Oct 13, 2010 9:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2010-10-13T18:22:19+00:00</updated>

		<published>2010-10-13T18:22:19+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20487#p20487</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20487#p20487"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20487#p20487"><![CDATA[
<blockquote class="uncited"><div>@Erwin/Morten: You are refering to non-linerar complementary problems. Where did we move from the LCP to the NCP? Which part is actually non-linear in the ODE/Bullet formulation?</div></blockquote>According to Kenny, updating the low/high limits for the friction every iteration makes the problem non-linear. This is also why we cannot prove convergence of PGS anymore.<br>Thanks,<br>Erwin<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Wed Oct 13, 2010 6:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2010-10-13T17:58:29+00:00</updated>

		<published>2010-10-13T17:58:29+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20485#p20485</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20485#p20485"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20485#p20485"><![CDATA[
@Erwin/Morten: You are refering to non-linerar complementary problems. Where did we move from the LCP to the NCP? Which part is actually non-linear in the ODE/Bullet formulation?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Wed Oct 13, 2010 5:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2010-10-13T17:55:36+00:00</updated>

		<published>2010-10-13T17:55:36+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20484#p20484</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20484#p20484"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20484#p20484"><![CDATA[
<blockquote class="uncited"><div>I was confused by Kenny's dissertation were he presented results and said that he used PSG. I wonder how he did that.</div></blockquote>Look at my post before. It shows quite easily how you arrive at a velocity level formulation that can be solved using PGS.<br><br>Note that there is no difference between SI and PGS as Erwin points out correctly. The view of of the problem with SI is much easier (at least in my opinion) and allows some optimizations which are maybe not directly apparent if you take the PGS route. SI is not as abstract as PGS and helps understanding everything better if you ask me.<br><br><br><br>-Dirk<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14">Dirk Gregorius</a> — Wed Oct 13, 2010 5:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[silcowitz]]></name></author>
		<updated>2010-10-13T17:41:15+00:00</updated>

		<published>2010-10-13T17:41:15+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20483#p20483</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20483#p20483"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20483#p20483"><![CDATA[
Just to clear out some potential confusion early on, its not NN-CP, its NN-CG, because the last two letters refers to Conjugate Gradients <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Anyways, I had good results using the NNCG solver in Jinngine (<a href="http://code.google.com/p/jinngine/" class="postlink">http://code.google.com/p/jinngine/</a>). But I would really like to hear about other peoples experiences, in case somebody should try it out. <br><br>/morten silcowitz<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1822">silcowitz</a> — Wed Oct 13, 2010 5:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2010-10-13T16:13:23+00:00</updated>

		<published>2010-10-13T16:13:23+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20480#p20480</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20480#p20480"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20480#p20480"><![CDATA[
* Correction: NNCP should be NNCG *<br><blockquote class="uncited"><div>Let me put it another way: Bullet does not solve for friction and normal forces together</div></blockquote>I think you misunderstand, Bullet does solve friction and normal forces together during all PGS iterations. The interaction (or impulse exchange) between contact constraints is the same as the interaction between contact and friction constraints. In other words, for n iterations, the friction is based on the most up-to-date normal force for n times, and the normal force is based on the friction force for previous iteration for (n-1) times. By default, Bullet uses 10 iterations, but you can increase this if you like higher quality/stiffness.<blockquote class="uncited"><div>Erwin, you are right Stewart used Lemke to solve MLCP. I was confused by Kenny's dissertation were he presented results and said that he used PSG. I wonder how he did that.</div></blockquote>The PGS that Kenny describes in his PhD thesis chapter 6 (did you read chapter 6?) is based on the NCP/PGS formulation used by ODE quickstep or the Bullet PGS/SI constraint solver.<br>Sequential Impulse is just a different name than PGS, it is not more efficient, just more intuitively explained that's all. The PGS derivation is more math-heavy.<br><br>For very stiff systems, or systems with large math ratios, you might want to try a direct solver instead of an iterative solver. You should check out ODE's Dantzig solver (dWorldStep instead of dWorldQuickstep) or ngbinh's work on Trinkle/Stewart using the PATH solver. Perhaps Kenny Erleben's latest <a href="http://iphys.wordpress.com/2010/06/08/a-nonsmooth-nonlinear-conjugate-gradient-method-for-interactive-contact-force-problems/" class="postlink">NN-CG work</a> might help too?<br>Thanks,<br>Erwin<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Wed Oct 13, 2010 4:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[leromi]]></name></author>
		<updated>2010-10-13T15:03:43+00:00</updated>

		<published>2010-10-13T15:03:43+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20476#p20476</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20476#p20476"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20476#p20476"><![CDATA[
Thank you all.<br><br>Erwin, you are right Stewart used Lemke to solve MLCP. I was confused by Kenny's dissertation were he presented results and said that he used PSG. I wonder how he did that.<br><br>Currently, I have implemented NCP from the paper  "Poulsen,M., Niebe,S., Erleben,K.: Heuristic Convergence Rate Improvements of<br>the Projected Gauss-Seidel Method for Frictional Contact Problems", the link you gave me <a href="http://wscg.zcu.cz/WSCG2010/Papers_2010/!_2010_FULL-proceedings.pdf" class="postlink">http://wscg.zcu.cz/WSCG2010/Papers_2010 ... edings.pdf</a> .<br>It works well for simple configuration, I didn't have a chance to test it for complicated systems.<br><br>As I understand SI is very similar to this approach and much faster. I will try to implement it later and compare the results.<br><br>I am interested in simulation of stiff systems like large vehicles.<br>What scheme would you recommend for time stepping, especially for stiff systems?<br>Explicit - problem with convergence?<br>Implicit - additional iteration to bring joints to the current time step?<br>Maybe Verlet? - how does it work with stiff configurations?<br><br>Thank you.<br><br>Ros.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=7167">leromi</a> — Wed Oct 13, 2010 3:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dirk Gregorius]]></name></author>
		<updated>2010-10-13T13:24:20+00:00</updated>

		<published>2010-10-13T13:24:20+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20475#p20475</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20475#p20475"/>
		<title type="html"><![CDATA[Re: How to solve MLCP with Projected Gauss-Seidel?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=20475#p20475"><![CDATA[
Sorry, I read the thread way too quick. So what we usually do for games and what is also explained in Kenny Erleben's thesis is a velocity based time stepper. The original problem (using only holonome constraints to get you the idea is):<br><br>x' = v<br>v' = M^-1 * ( JT * lambda + f_ext )<br>C(x) = 0<br><br>So you have three equations for three unknowns (x', v', lambda), but you cannot solve it. The first two and the third equations are not related. Many ways exist, but the one usually used in games uses a symplectic Euler and solves on the velocity level instead of the position level. This is already a linearization since you now look at the tangent space of the original constraint space. So basically you have:<br><br>x2 = x1 + v2 * dt<br>v2 = v1 + M^-1 * ( JT * lambda + f_ext ) * dt<br>J * v2 = 0<br><br>M * v2 - JT * lambda * dt = M * v1 + f_ext * dt<br>-J* v2 = 0<br><br>[  M -JT ] [    v2    ] = b<br>[ -J   0  ] [ lambda' ] = 0  // lambda' = lambda * dt<br><br>This system could *not* be solved with PGS (it also has zeros on its diagonals). But it has other interesting properties, e.g. it is always sparse and for hierarchical structures you can solve it in linear time. If you now plug the second into the third equation you get the so called effective mass form which I already mentioned above:<br><br>J*M-^1*JT * lambda = -J * ( v1 + M-^1 * f_ext * dt )<br><br><br>This can be solved with PGS now since J*M-^1*JT is PD diagonal dominant. Usually you don't have only holonome constraints, but also contact, friction, limits, and motors. From there it is pretty simple to add these. Erwin summarized the friction differences very well and I agree that this is usally sufficient for games. I cannot comment on robotics though. Still I recommed using an impulse implementation like SI since they are very efficient and easy to implement. You can also play with different friction ideas like e.g. circular clamping very, very easily. You cannot prove convergence in these cases (at least I can't), but this works really well in practise.<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 Oct 13, 2010 1:24 pm</p><hr />
]]></content>
	</entry>
	</feed>
