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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2007-02-01T07:08:38+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Jan Bender]]></name></author>
		<updated>2007-02-01T07:08:38+00:00</updated>

		<published>2007-02-01T07:08:38+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3405#p3405</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3405#p3405"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3405#p3405"><![CDATA[
<blockquote class="uncited"><div>but if there is no current error, wouldn't the vector: dir = joint-&gt;ref_point1-joint-&gt;ref_point2<br>be null, since the joint-attachment-points will be coincident??</div></blockquote>The direction is just required for the distance joint (a joint where the joint points have a distance &gt; 0). So in this case the vector dir is never 0.<br><br>If you want to simulate a simple ball joint, then you don't need this current direction. In this case the impulse is:<br><br>p = K^{-1} * future_error<br><br>Jan<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=818">Jan Bender</a> — Thu Feb 01, 2007 7:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[raigan2]]></name></author>
		<updated>2007-02-01T01:55:57+00:00</updated>

		<published>2007-02-01T01:55:57+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3404#p3404</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3404#p3404"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3404#p3404"><![CDATA[
but if there is no current error, wouldn't the vector: dir = joint-&gt;ref_point1-joint-&gt;ref_point2<br>be null, since the joint-attachment-points will be coincident??<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=748">raigan2</a> — Thu Feb 01, 2007 1:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MadMax]]></name></author>
		<updated>2007-02-01T01:09:35+00:00</updated>

		<published>2007-02-01T01:09:35+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3403#p3403</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3403#p3403"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3403#p3403"><![CDATA[
There is no current error. If you start the iteration over the constriants all the constriants are satisfyed. <br><br><br><img src="http://i31www.ira.uka.de/projekte/mechanik/img/Pic8.gif" class="postimage" alt="Image"><br><br>This pic from Jans homepage should clarify it.<br><br>MFG<br>Manuel Fuchs<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1595">MadMax</a> — Thu Feb 01, 2007 1:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[raigan2]]></name></author>
		<updated>2007-01-31T20:06:57+00:00</updated>

		<published>2007-01-31T20:06:57+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3401#p3401</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3401#p3401"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3401#p3401"><![CDATA[
I'm not clear on how this works: lets say the current position error is (1,0) and the future error is (0,1) -- if you use the current positions to generate the impulse direction, no amount of scaling will be able to current the future error.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=748">raigan2</a> — Wed Jan 31, 2007 8:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jan Bender]]></name></author>
		<updated>2007-01-31T15:07:59+00:00</updated>

		<published>2007-01-31T15:07:59+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3398#p3398</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3398#p3398"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3398#p3398"><![CDATA[
<blockquote class="uncited"><div>Are you using the future/predicted state to determine the magnitude of the impulse?</div></blockquote>Yes. I use the predicted state to approximate how the velocities of the bodies must change now so that the constraint will be satisfied in the future.<br><br>Jan<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=818">Jan Bender</a> — Wed Jan 31, 2007 3:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[raigan2]]></name></author>
		<updated>2007-01-31T14:57:53+00:00</updated>

		<published>2007-01-31T14:57:53+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3397#p3397</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3397#p3397"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3397#p3397"><![CDATA[
Are you using the future/predicted state to determine the magnitude of the impulse?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=748">raigan2</a> — Wed Jan 31, 2007 2:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jan Bender]]></name></author>
		<updated>2007-01-31T07:34:10+00:00</updated>

		<published>2007-01-31T07:34:10+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3394#p3394</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3394#p3394"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3394#p3394"><![CDATA[
For those who are interested... The solution of the problem was the following line:<br><div class="codebox"><p>Code: </p><pre><code>imp =(joint-&gt;att_body1-&gt;get_mass())*((delta/dist)*vec); </code></pre></div>This should look like this <div class="codebox"><p>Code: </p><pre><code>VECTOR3 dir = joint-&gt;ref_point1-joint-&gt;ref_point2;imp =(joint-&gt;att_body1-&gt;get_mass())*((delta/dist)*dir); </code></pre></div>since the impulse must have the direction of the actual difference of the joint points and not the difference in the future.<br><br>Jan<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=818">Jan Bender</a> — Wed Jan 31, 2007 7:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MadMax]]></name></author>
		<updated>2007-01-29T13:29:40+00:00</updated>

		<published>2007-01-29T13:29:40+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3378#p3378</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3378#p3378"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3378#p3378"><![CDATA[
thanks for your answer.<br><br>There is only one joint in the example it is direct in the center of the body.<br><br>I send you my code via mail.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1595">MadMax</a> — Mon Jan 29, 2007 1:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jan Bender]]></name></author>
		<updated>2007-01-29T08:54:06+00:00</updated>

		<published>2007-01-29T08:54:06+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3373#p3373</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3373#p3373"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3373#p3373"><![CDATA[
Hi, <br><blockquote class="uncited"><div>For testing i have implementet a simple Demo which is just a single pendular mountet on a fix point.<br>The Problem is that there is an error which slows the pendular over time so that after a long period it stands.</div></blockquote>Your code seems to be okay. I just tried the same example with my own code and the pendulum is not slowed down. So probably something went wrong. <br><br>To get some more accurate results you should call the function "check_fix_constraint" multiple times until "abs(delta) &lt; DIS_DELTA" is satisfied for a small DIS_DELTA (the smaller the more accuracy). <br>Is each joint point in the center of mass of its body?<br><br>Maybe you can send me the rest of the code and I take a look at it?<br><br>Jan<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=818">Jan Bender</a> — Mon Jan 29, 2007 8:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MadMax]]></name></author>
		<updated>2007-01-29T00:13:42+00:00</updated>

		<published>2007-01-29T00:13:42+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3372#p3372</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3372#p3372"/>
		<title type="html"><![CDATA[Impulse Based Methode]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=3372#p3372"><![CDATA[
Hi,<br><br>at the moment i'm working on an simple Phyisk engine. I decided to use the Impuls Base Methode for solving constraints.<br><a href="http://www.impulse-based.de" class="postlink">http://www.impulse-based.de</a><br>For testing i have implementet a simple Demo which is just a single pendular mountet on a fix point.<br>The Problem is that there is an error which slows the pendular over time so that after a long period it stands.<br><br>Here is the relevant part of my code may be somebody see an mistake.<br><br><br><br>This is the code to calculate the correct impuls<br><div class="codebox"><p>Code: </p><pre><code>bool MultiBodySystem::check_fix_constraint(STRUCT_JOINT* joint,float time){VECTOR3 p;VECTOR3 vec;float   dist;float   delta;VECTOR3 imp;p = joint-&gt;att_body1-&gt;look_ahead_world(joint-&gt;ref_point1,time);vec = p-joint-&gt;ref_point2;     //joint-&gt;ref_point2 == fix point pendular is mounteddist = vec.Length();delta  = joint-&gt;float_arr[0]-dist;   //joint-&gt;float_arr[0] == length of pendularif(abs(delta) &lt; DIS_DELTA)return true;imp =(joint-&gt;att_body1-&gt;get_mass())*((delta/dist)*vec);imp = 1.0/time*imp;joint-&gt;att_body1-&gt;add_impulse_force(imp);return false;}</code></pre></div><br>Here is the code that is used to apply the impuls to a body<br><div class="codebox"><p>Code: </p><pre><code>void RigidBody::add_impulse_force(VECTOR3 force){this-&gt;center_velocity += 1.0/this-&gt;body_mass*force;}</code></pre></div>and finaly the code is used for look ahead and also to update position and velocity<br><div class="codebox"><p>Code: </p><pre><code>VECTOR3  RigidBody::integrate(bool look_ahead,float time){this-&gt;new_center_position = this-&gt;center_position + this-&gt;center_velocity*time+0.5*1.0/this-&gt;body_mass*time*time*this-&gt;frame_force; this-&gt;new_center_velocity = this-&gt;center_velocity + 1.0/this-&gt;body_mass*time*this-&gt;frame_force;return this-&gt;new_center_position;}</code></pre></div>in frame_force is stored the gravity.<br><br>PS:<br><br>sorry for my bad english i am german.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1595">MadMax</a> — Mon Jan 29, 2007 12:13 am</p><hr />
]]></content>
	</entry>
	</feed>
