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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2019-02-26T00:52:30+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2019-02-26T00:52:30+00:00</updated>

		<published>2019-02-26T00:52:30+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41891#p41891</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41891#p41891"/>
		<title type="html"><![CDATA[Re: Remove Collision from an entire MultiBody]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41891#p41891"><![CDATA[
Good to hear it is fixed!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Tue Feb 26, 2019 12:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Lewho]]></name></author>
		<updated>2019-02-19T11:34:25+00:00</updated>

		<published>2019-02-19T11:34:25+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41875#p41875</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41875#p41875"/>
		<title type="html"><![CDATA[Re: Remove Collision from an entire MultiBody]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41875#p41875"><![CDATA[
Thanks a lot it works !!! and with the complexity of O(n²)<br><br>Here the final code for peoples who want it<br><div class="codebox"><p>Code: </p><pre><code># pop =&gt; Array of multibody personal class where is stored the unique ID and number of links and all the links matricesdef removeAllColisions(pop):    for elem in pop:        # Get the numbre of sub-object/links in the multibody        for i in range(-1, elem.nbobj):            p.setCollisionFilterGroupMask(elem.getId(), i, 0, 0)            p.setCollisionFilterPair(0, elem.getId(), -1, i, 1)</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13209">Lewho</a> — Tue Feb 19, 2019 11:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2019-02-19T00:18:53+00:00</updated>

		<published>2019-02-19T00:18:53+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41874#p41874</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41874#p41874"/>
		<title type="html"><![CDATA[Re: Remove Collision from an entire MultiBody]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41874#p41874"><![CDATA[
PyBullet. setCollisionFilterGroupMask  should be fixed in latest repository. Thanks for the report.<br><br>Note that link index -1 refers to the base, and link index &gt;=0 refers to child links.<br><a href="https://github.com/bulletphysics/bullet3/pull/2116" class="postlink">https://github.com/bulletphysics/bullet3/pull/2116</a><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Tue Feb 19, 2019 12:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Lewho]]></name></author>
		<updated>2019-02-12T14:10:44+00:00</updated>

		<published>2019-02-12T14:10:44+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41862#p41862</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41862#p41862"/>
		<title type="html"><![CDATA[Re: Remove Collision from an entire MultiBody]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41862#p41862"><![CDATA[
No one respond .. nice. The issue is in fact still open on github (<a href="https://github.com/bulletphysics/bullet3/issues/2020" class="postlink">https://github.com/bulletphysics/bullet3/issues/2020</a>) and erwin coumans ignore the <span style="text-decoration:underline"><strong class="text-strong">BUG</strong></span> still 1 month after. The only way i found is complexity O(n^4) which it's very very bad conpare to the real who is O(n^2)<br><br>Solution for intrested person who need to have a proof of concept : <br><div class="codebox"><p>Code: </p><pre><code>for i in range(-1, nbobj):        for j in range(-1, nbobj):            for elem1 in range(0, nbPop):                for elem2 in range(elem1+1, nbPop):                      p.setCollisionFilterPair(pop[elem1].getId(), pop[elem2].getId(), i, j, 0)        print((i+2)/(nbobj+1))</code></pre></div> <br><br>We need to remove the collision pair by pair so if you have 100 objects it's a 100*100 calculation. the fun doesn't end here.... if you have 10 piece in your multibody you need still to remove the collision pair by pair AGAIN. So it's actualy 100*100*10*10 calculation...<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13209">Lewho</a> — Tue Feb 12, 2019 2:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Lewho]]></name></author>
		<updated>2019-02-07T22:18:51+00:00</updated>

		<published>2019-02-07T22:18:51+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41851#p41851</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41851#p41851"/>
		<title type="html"><![CDATA[Remove Collision from an entire MultiBody]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=41851#p41851"><![CDATA[
Hi,<br><br>i have a certain number of random generated MultiBody with multiple links BUT i dont want them to collide beteen them and i also want them to keep colliding with my main plane floor.<br><br>I find a solution but it works only on the body of the multy body not on the links. Part of the problem is :  i dont know what is the LinkIndex parameter in the setCollisionFilterGroupMask function.<br><br>My code at the moment : <div class="codebox"><p>Code: </p><pre><code>p.createCollisionShape(p.GEOM_PLANE)basePlan = p.createMultiBody(0, 0)nbobj = 5body = p.createCollisionShape(p.GEOM_SPHERE, radius=1)body2 = p.createCollisionShape(p.GEOM_SPHERE, radius=0.5)aShape = s.Shape(body, pos1)aShape2 = s.Shape(body2, pos1)# intitialize multibody matrix for "nbobj" new linkaShape.createRandom(nbobj)aShape2.createRandom(nbobj)# do the createMultiBody and return the UniqueBodyidshape = aShape.createBody()shape2 = aShape2.createBody()# Do shape to not collidep.setCollisionFilterGroupMask(shape, -1, 0, 0)p.setCollisionFilterGroupMask(shape2, -1, 0, 0)# But enable the floor Collisionp.setCollisionFilterPair(basePlane, shape, -1, -1, 1)p.setCollisionFilterPair(basePlane, shape2, -1, -1, 1)</code></pre></div><p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13209">Lewho</a> — Thu Feb 07, 2019 10:18 pm</p><hr />
]]></content>
	</entry>
	</feed>
