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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2023-05-16T03:39:17+00:00</updated>

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

		<entry>
		<author><name><![CDATA[drleviathan]]></name></author>
		<updated>2023-05-16T03:39:17+00:00</updated>

		<published>2023-05-16T03:39:17+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44418#p44418</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44418#p44418"/>
		<title type="html"><![CDATA[Re: Quick question: Object moves different amount each frame despite constant velocity.]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44418#p44418"><![CDATA[
Also curious is: the distance traveled along the x-axis does not agree with your speed and timestep:<div class="codebox"><p>Code: </p><pre><code>time = 0.05 secrate = 250 m/secdistance = rate * time =  250 m/sec * 0.05 sec = 12.5m</code></pre></div>I wonder if you're bumping up against a maximum speed limit, especially since your total speed is so steady.  Maybe try measuring things at slower speeds?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=11033">drleviathan</a> — Tue May 16, 2023 3:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[GeanGean]]></name></author>
		<updated>2023-05-12T17:39:02+00:00</updated>

		<published>2023-05-12T17:39:02+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44417#p44417</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44417#p44417"/>
		<title type="html"><![CDATA[Quick question: Object moves different amount each frame despite constant velocity.]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44417#p44417"><![CDATA[
I have a vehicle (but I think the issue exists with normal rigid bodies) in a scene with a constant timestep that I get the position of each frame, to simplfy:<div class="codebox"><p>Code: </p><pre><code>//world-&gt;stepSimulation(deltaMS / 1000.0);world-&gt;stepSimulation(0.05,1,0.05);if(car-&gt;getCurrentSpeedKmHour() &gt; someValue)//if(car-&gt;getRigidBody()-&gt;getLinearVelocity().length() &gt; someValue){     car-&gt;getWheel(0).applyEngineForce(someOtherValue);     car-&gt;getWheel(1).applyEngineForce(someOtherValue);}btVector3 pos = car-&gt;getRigidBody()-&gt;getWorldTransform().getOrigin();float changeInPos = pos.x() - lastPos;lastPos = pos.x();std::cout&lt;&lt;"Change in pos: "&lt;&lt;changeInPos&lt;&lt;" Velocity: "&lt;&lt;car-&gt;getRigidBody()-&gt;getLinearVelocity().x()&lt;&lt;"\n";</code></pre></div>I could end up with output like this:<div class="codebox"><p>Code: </p><pre><code>Change in pos: 4.2 Velocity 250.0Change in pos: 4.1 Velocity 250.0Change in pos: 3.9 Velocity 250.0Change in pos: 4.2 Velocity 250.0Change in pos: 3.7 Velocity 250.0Change in pos: 4.5 Velocity 250.0Change in pos: 4.3 Velocity 250.0</code></pre></div>If the timestep is constant, and the velocity is constant, what is the issue? Why is change in pos not the same every time?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14521">GeanGean</a> — Fri May 12, 2023 5:39 pm</p><hr />
]]></content>
	</entry>
	</feed>
