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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2023-12-20T09:36:13+00:00</updated>

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

		<entry>
		<author><name><![CDATA[RKaji]]></name></author>
		<updated>2023-12-20T09:36:13+00:00</updated>

		<published>2023-12-20T09:36:13+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44481#p44481</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44481#p44481"/>
		<title type="html"><![CDATA[Re: How to remove bodyA when its in contact with bodyB?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=44481#p44481"><![CDATA[
I'm genuinely impressed with the comprehensive effort put into organizing the MSU-1 game list on Zeldix. It's a true game-changer for enthusiasts like me who appreciate the convenience of having everything in alphabetical order. The meticulous detailing in the sidenotes showcases a commitment to user-friendly navigation. Kudos to the team for making our gaming experience seamless and enjoyable! If you're as passionate about organization as I am, you might find this link helpful for any writing needs: (<a href="https://essaypro.com/write-my-speech" class="postlink">https://essaypro.com/write-my-speech</a>). Cheers to the Zeldix community for fostering a well-ordered and inclusive gaming hub!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14060">RKaji</a> — Wed Dec 20, 2023 9:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[AisyJeff]]></name></author>
		<updated>2022-04-06T01:11:23+00:00</updated>

		<published>2022-04-06T01:11:23+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43974#p43974</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43974#p43974"/>
		<title type="html"><![CDATA[Re: How to remove bodyA when its in contact with bodyB?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43974#p43974"><![CDATA[
Don't think its needed to use "self". This method is resolved by writing this in code:<br><div class="codebox"><p>Code: </p><pre><code>import pybullet as pimport pybullet_dataimport timephysicsClient = p.connect(p.GUI)p.setAdditionalSearchPath(pybullet_data.getDataPath())p.loadURDF('plane.urdf', [0,0,0])cube1=p.loadURDF("cube.urdf", [0,0,1])lego=p.loadURDF("cube.urdf", [0,0,4])p.setGravity(0,0,-10)def contactPoints():    contacts = p.getContactPoints(bodyA=cube1, bodyB=lego)    for contact in contacts:        link_index = contact[2]        if link_index &gt;= 0:                p.removeBody(lego)for i in range(10000):    p.stepSimulation()    contactPoints()    time.sleep(1./240.)</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14299">AisyJeff</a> — Wed Apr 06, 2022 1:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[AisyJeff]]></name></author>
		<updated>2022-04-05T12:34:41+00:00</updated>

		<published>2022-04-05T12:34:41+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43969#p43969</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43969#p43969"/>
		<title type="html"><![CDATA[How to remove bodyA when its in contact with bodyB?]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43969#p43969"><![CDATA[
this is the sample code. Then I uses "p.getContactPoint()" between bodyA and bodyB. Then, I would like to remove bodyA after they hit each other using p.removeBody(). This is the code:<br><div class="codebox"><p>Code: </p><pre><code>import pybullet as pimport pybullet_dataimport timephysicsClient = p.connect(p.GUI)p.setAdditionalSearchPath(pybullet_data.getDataPath())p.loadURDF('plane.urdf', [0,0,0])cube1=p.loadURDF("cube.urdf", [0,0,1])lego=p.loadURDF("cube.urdf", [0,0,4])p.setGravity(0,0,-10)def contactPoints(self):    contacts = p.getContactPoints(bodyA=self.cube1, bodyB=self.lego)    for contact in contacts:        link_index = contact[2]        if link_index &gt;= 0:                p.removeBody(self.lego)for i in range(10000):    p.stepSimulation()    time.sleep(1./240.)       </code></pre></div><br>Hopefully anyone can help me with this. It seems simple but I can't get it done  <img class="smilies" src="https://pybullet.org/Bullet/phpBB3/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=14299">AisyJeff</a> — Tue Apr 05, 2022 12:34 pm</p><hr />
]]></content>
	</entry>
	</feed>
