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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2006-11-01T04:41:55+00:00</updated>

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

		<entry>
		<author><name><![CDATA[hiker]]></name></author>
		<updated>2006-11-01T04:41:55+00:00</updated>

		<published>2006-11-01T04:41:55+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2299#p2299</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2299#p2299"/>
		<title type="html"><![CDATA[Newbie Question]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2299#p2299"><![CDATA[
<blockquote class="uncited"><div>TuxKart with Bullet physics!   Now that's a weird experience...</div></blockquote>*grin* You shouldn't be surprised, you were the one who recommended bullet to me <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <blockquote class="uncited"><div>I wrote the original TuxKart (upon which SuperTuxKart is built) - it's very strange to see one's own ancient offspring popping up in places like this!<br>TuxKart with physics....WOW!</div></blockquote>Well, I hope that we get (what's now) supertuxkart to a really nice state - using a ready-to-go physics engine (hopefully) simplifies the task.<br><br>Cheers,<br>   Joerg<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1091">hiker</a> — Wed Nov 01, 2006 4:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SteveBaker]]></name></author>
		<updated>2006-11-01T04:01:52+00:00</updated>

		<published>2006-11-01T04:01:52+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2297#p2297</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2297#p2297"/>
		<title type="html"><![CDATA[Newbie Question]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2297#p2297"><![CDATA[
Woah! I just noticed!<br><br>TuxKart with Bullet physics!   Now that's a weird experience...I wrote the original TuxKart (upon which SuperTuxKart is built) - it's very strange to see one's own ancient offspring popping up in places like this!<br><br>TuxKart with physics....WOW!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=726">SteveBaker</a> — Wed Nov 01, 2006 4:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SteveBaker]]></name></author>
		<updated>2006-11-01T03:57:50+00:00</updated>

		<published>2006-11-01T03:57:50+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2296#p2296</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2296#p2296"/>
		<title type="html"><![CDATA[Newbie Question]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2296#p2296"><![CDATA[
<blockquote class="uncited"><div>BTW, there is a 'no newline at end of file' warning for btDefaultMotionState.h :)</div></blockquote>Erwin has a real problem 'habit' with creating these!  I fix 'em up as fast as I can - but it's an uphill battle!<br><br>  :-)<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=726">SteveBaker</a> — Wed Nov 01, 2006 3:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[hiker]]></name></author>
		<updated>2006-10-30T04:52:37+00:00</updated>

		<published>2006-10-30T04:52:37+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2258#p2258</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2258#p2258"/>
		<title type="html"><![CDATA[Newbie Question]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2258#p2258"><![CDATA[
<blockquote class="uncited"><div>The btBoxShape takes half extents, not the full length of the sides.</div></blockquote>Ah - I checked for overlapping before posting, but wasn't aware that half extents are used. A quick test shows that this solves the problem <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Thanks!<br><blockquote class="uncited"><div>Also, it is recommended to use the btMotionState to synchronize the graphics/physics transforms. The other constructor of btRigidBody will probably disappear soon/made obsolete.</div></blockquote>btDefault MotionState was not declared in bullet-2.-18a, but it works now with the latest snapshot - great, thanks.<br><br>BTW, there is a 'no newline at end of file' warning for btDefaultMotionState.h <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks a lot!<br>   Joerg<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1091">hiker</a> — Mon Oct 30, 2006 4:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2006-10-30T04:22:56+00:00</updated>

		<published>2006-10-30T04:22:56+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2256#p2256</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2256#p2256"/>
		<title type="html"><![CDATA[Newbie Question]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2256#p2256"><![CDATA[
Hi,<br><br>Can you try this with only 1 single object added to Bullet? What is the distance between the objects? It looks like the objects are overlapping initially. One good help would be to hookup the debugDrawer. The btBoxShape takes half extents, not the full length of the sides.<br><br>Also, it is recommended to use the btMotionState to synchronize the graphics/physics transforms. The other constructor of btRigidBody will probably disappear soon/made obsolete.<br><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> — Mon Oct 30, 2006 4:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[hiker]]></name></author>
		<updated>2006-10-30T03:56:59+00:00</updated>

		<published>2006-10-30T03:56:59+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2255#p2255</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2255#p2255"/>
		<title type="html"><![CDATA[Newbie Question]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=2255#p2255"><![CDATA[
Hi,<br><br>I am very new to bullet, and I want to use bullet for a kart game (see <a href="http://supertuxkart.berlios.de" class="postlink">http://supertuxkart.berlios.de</a>). So first an apology for asking stupid questions.<br><br>I've started by using a simple boxe for each kart, and without any collision detection (e.g. track) am just letting them fall down (a very simple first test <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> ). I expected that only the z (gravity) coordinate would change. But I see that the other coordinates are changing as well, e.g. :<br>(format  body 0: &lt;x&gt; &lt;y&gt; &lt;z&gt; dt &lt;delta t&gt;)<br><div class="codebox"><p>Code: </p><pre><code>body 0: 1.500000 -1.500000 -0.018948 dt 0.000000body 0: 1.500000 -1.500000 -0.018948 dt 0.014394body 0: 1.554279 -1.449197 -0.238790 dt 0.006532body 0: 1.554279 -1.449197 -0.238790 dt 0.006405body 0: 1.608559 -1.398393 -0.461356 dt 0.006611body 0: 1.608559 -1.398393 -0.461356 dt 0.006349</code></pre></div>1.5/-1.5/-0.018948 are the start coordinates, and the falling appears to be working as expected (quadratic behaviour). But the x/y coordinates change linearly as well.<br><br>If I set the kart start coordinates to 0/0/0, everything works as expected - x/y remain (nearly) 0 (rounding errors only), and the box is falling. So I guess I must be forgetting to reset the velocity(?) somewhere, or some functions are not doing what I expect them to do.<br><br>Secondly, if I use a 2nd kart (starting at -1.500000 -3.000000 -0.018948 ), this kart will first raise before starting to fall, and it is showing the same linear behaviour in the x/y coordinates but in the opposite direction compared with the kart above, e.g.:<br><div class="codebox"><p>Code: </p><pre><code>body 1: -1.500000 -3.000000 -0.018948 dt 0.000000body 1: -1.500000 -3.000000 -0.018948 dt 0.014394body 1: -1.554279 -3.050803 0.195446 dt 0.006532body 1: -1.554279 -3.050803 0.195446 dt 0.006405body 1: -1.608559 -3.101606 0.407115 dt 0.006611</code></pre></div>Any hints appreciated  - I am sure it is something stupid <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">   (I will of course be using a more complex kart model, but I first wanted to get my head around how to get started - btw, thanks to Erwin for updateing the vehicle demo!!!):<br><br>Cheers,<br>   Joerg<br><br>This is all the code using the bullet physics, nothing else (bullet related) happens in between.<br><br>World creation:<div class="codebox"><p>Code: </p><pre><code>    m_dynamics_world = new btDiscreteDynamicsWorld();    m_dynamics_world-&gt;setGravity(btVector3(0.0f, 0.0f, -gravity));</code></pre></div>Adding a kart:<div class="codebox"><p>Code: </p><pre><code>    //x_* and y* are the minimum/maximum coordinates of the kart model    // resuling in a size of approx 3.5 x 2.2 (x/y direction)    btCollisionShape *box = new btBoxShape(btVector3(x_max-x_min,                                                      y_max-y_min,                                                      1.0f)       );    sgCoord *pos=kart-&gt;getCoord();    btTransform trans;    trans.setIdentity();    trans.setOrigin(btVector3(pos-&gt;xyz[0], pos-&gt;xyz[1], pos-&gt;xyz[2]));    // it works as expected if I use:        // trans.setOrigin(btVector3(0.0f,0.0f,0.0f));    float mass=kart-&gt;getMass();    btVector3 inertia;    box-&gt;calculateLocalInertia(mass, inertia);    btRigidBody* kart_body = new btRigidBody(mass, trans, box, inertia);    kart_body-&gt;m_worldTransform.setRotation(btQuaternion(0,0,0,1));    kart_body-&gt;setLinearVelocity(btVector3(0.0f,0.0f,0.0f));    kart_body-&gt;setAngularVelocity(btVector3(0,0,0));    m_dynamics_world-&gt;addRigidBody(kart_body);</code></pre></div>and during a time step:<div class="codebox"><p>Code: </p><pre><code>    int max_sim_sub_steps = 1;    int numSimSteps = m_dynamics_world-&gt;stepSimulation(dt,max_sim_sub_steps);    int numObjects = m_dynamics_world-&gt;getNumCollisionObjects();    for(int i=0; i&lt;numObjects; i++)     {        btCollisionObject *obj = m_dynamics_world-&gt;getCollisionObjectArray()[i];        btRigidBody* body = btRigidBody::upcast(obj);        if(!body) continue;        const btVector3 &amp;pos=body-&gt;getCenterOfMassPosition();        printf("body %d: %f %f %f dt %f\n",i, pos.x(), pos.y(), pos.z(),dt);            }</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=1091">hiker</a> — Mon Oct 30, 2006 3:56 am</p><hr />
]]></content>
	</entry>
	</feed>
