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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-10-12T18:54:36+00:00</updated>

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

		<entry>
		<author><name><![CDATA[jparaujo]]></name></author>
		<updated>2021-10-12T18:54:36+00:00</updated>

		<published>2021-10-12T18:54:36+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43648#p43648</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43648#p43648"/>
		<title type="html"><![CDATA[Objects snapping into equilibrium position]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43648#p43648"><![CDATA[
The "Hello Bullet World!" example from the Quickstart Guide with the R2D2 URDF runs fine. Changing that to the "objects/mug.urdf" file and keeping the default orientation at first seems to have no impact. However, if the initial orientation of the mug is changed, then it will snap back into the default orientation as if it was being pulled by a magnet (see <a href="https://pasteboard.co/CzVYGdu9w6jr.gif" class="postlink">https://pasteboard.co/CzVYGdu9w6jr.gif</a>; I use the mouse to move slightly the mug; the rest is the Bullet's doing). So far I haven't found any explanation for this in the documentation or the forums. Why does this happen, and how can I disable it?<br><br>Here is the code I'm using<br><div class="codebox"><p>Code: </p><pre><code>import pybullet as pimport pybullet_dataphysicsClient = p.connect(p.GUI) # or p.DIRECT for non-graphical versionp.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionallyp.setGravity(0,0,-10)planeId = p.loadURDF("plane.urdf")startPos = [0,0,1]startOrientation = [1, 0, 0, 0] # p.getQuaternionFromEuler([0,0,0])boxId = p.loadURDF("objects/mug.urdf",startPos, startOrientation)#set the center of mass frame (loadURDF sets base link frame) startPos/Ornp.resetBasePositionAndOrientation(boxId, startPos, startOrientation)logID = p.startStateLogging(p.STATE_LOGGING_VIDEO_MP4, "snapping.mp4")for i in range (2000):    p.stepSimulation()    time.sleep(1./240.)p.stopStateLogging(logID)cubePos, cubeOrn = p.getBasePositionAndOrientation(boxId)print(cubePos,cubeOrn)p.disconnect()</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14112">jparaujo</a> — Tue Oct 12, 2021 6:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
