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

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

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

		<entry>
		<author><name><![CDATA[Nanospin]]></name></author>
		<updated>2021-09-03T13:54:10+00:00</updated>

		<published>2021-09-03T13:54:10+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43584#p43584</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43584#p43584"/>
		<title type="html"><![CDATA[How to break the joint between two rotating sphere]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43584#p43584"><![CDATA[
Hi everyone, <br><br>I would like to do a quite simple simulation but I fail to create it... May be my understanding of bullet is wrong. <br><br>I would like to create two sphere connected by a fixed joint, the sphere is located at (0,0,2) and the second one at (0,0,2). These two spheres are rotating at a constant speed around the (0,0,0) point. At some point, I would like to break the joint and let the sphere move away.<br><br>There is no gravity<br><br>I tried to create a multibody: <br><div class="codebox"><p>Code: </p><pre><code>sphereRadius = 0.5sphere_base = p.createCollisionShape(p.GEOM_SPHERE, radius=sphereRadius)sphere_1 = p.createCollisionShape(p.GEOM_SPHERE, radius=sphereRadius)sphere_2 = p.createCollisionShape(p.GEOM_SPHERE, radius=sphereRadius)mass = 1visualShapeId = -1# Link relatedsphereUid = p.createMultiBody(baseMass = mass,                baseCollisionShapeIndex = sphere_base,                baseVisualShapeIndex = visualShapeId,                basePosition = [0, 0, 0],                baseOrientation = [0, 0, 0, 1],                linkMasses= [1, 1],                linkCollisionShapeIndices=[sphere_1, sphere_2],                linkVisualShapeIndices=[-1, -1],                linkPositions=[[0, 0, 2], [0, 0, -2]],                linkOrientations=[[0, 0, 0, 1], [0, 0, 0, 1]],                linkInertialFramePositions=[[0, 0, 0], [0, 0, 0]],                linkInertialFrameOrientations=[[0, 0, 0, 1], [0, 0, 0, 1]],                linkParentIndices=[0, 0],                linkJointTypes= [p.JOINT_FIXED, p.JOINT_FIXED],                linkJointAxis=[[0, 0, 1], [0, 0, -1]])</code></pre></div>It works but I do not know how to break the joints... <br>I understood that the constraint is may be a better option. I know I can remove a constraint. However, I am not able to obtain the proper rotation around 0.<br><div class="codebox"><p>Code: </p><pre><code>sphere_1 = p.createCollisionShape(p.GEOM_SPHERE, radius=sphereRadius)sphere_0_uid = p.createMultiBody(baseMass = 1,                baseCollisionShapeIndex = sphere_1,                baseVisualShapeIndex = -1,                basePosition = [0, 0, 0],                baseOrientation = [0, 0, 0, 1])sphere_1_uid = p.createMultiBody(baseMass = 1,                baseCollisionShapeIndex = sphere_1,                baseVisualShapeIndex = -1,                basePosition = [0, 0, 2],                baseOrientation = [0, 0, 0, 1])                c1 = p.createConstraint(    parentBodyUniqueId = sphere_0_uid,     parentLinkIndex = -1,     childBodyUniqueId = sphere_1_uid,     childLinkIndex = -1,     jointType = p.JOINT_FIXED,     jointAxis = [0, 0, 0],     parentFramePosition = [0, 0, 2],     childFramePosition = [0, 0, -0.5])                     OMEGA = 3.14p.resetBaseVelocity(sphere_0_uid, [0, 0, 0], [0, OMEGA , 0]) </code></pre></div>Any advices to do this basic simulation? <br><br>ps: I don't display it but I have set all dynamic parameters (Friction, damping, stiffness) = 0. I would like to see vacuum physics<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13402">Nanospin</a> — Fri Sep 03, 2021 1:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
