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

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2014-01-13T16:40:34+00:00</updated>

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

		<entry>
		<author><name><![CDATA[Moose]]></name></author>
		<updated>2014-01-13T16:40:34+00:00</updated>

		<published>2014-01-13T16:40:34+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=32582#p32582</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=32582#p32582"/>
		<title type="html"><![CDATA[assertion in Gimpact collision objects with constraints]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=32582#p32582"><![CDATA[
Hello,<br><br>I'm running Gimpact here for concave triangle meshes. So far with success and I like the results.<br>However, when I have a collision of two if those objects caused by a constraint I get an assertion.<br><br>I have two test cases.<br><br>a) A cone shaped static Gimpact mesh with a hinge that lets a dynamic torus fall onto the cone<br>b) A slider that lets the torus slide onto the cone vertically when a 6dof constraint pulls it towards the cone<br><br>In both cases the assertion occurs at the exact moment the objects would collide if they weren't concave. In Debug builds bullet throws the assertion right away. In Release builds the software continues to run but crashes after a few more seconds. This is vc90 on windows 64 bit build of stock bullet 2.82.<br><br>Here's the call stack:<br><br>&gt;physik_bullet-d_1.dll!btVector3::normalize()  Line 300 + 0x25 bytesC++<br> physik_bullet-d_1.dll!btPrimitiveTriangle::buildTriPlane()  Line 91C++<br> physik_bullet-d_1.dll!btGImpactCollisionAlgorithm::collide_sat_triangles(const btCollisionObjectWrapper * body0Wrap=0x0000000013e0dd78, const btCollisionObjectWrapper * body1Wrap=0x0000000013e0ddb8, const btGImpactMeshShapePart * shape0=0x0000000010594e40, const btGImpactMeshShapePart * shape1=0x000000001253ce40, const int * pairs=0x000000001075fff0, int pair_count=5685)  Line 427C++<br> physik_bullet-d_1.dll!btGImpactCollisionAlgorithm::gimpact_vs_gimpact(const btCollisionObjectWrapper * body0Wrap=0x0000000013e0dd78, const btCollisionObjectWrapper * body1Wrap=0x0000000013e0ddb8, const btGImpactShapeInterface * shape0=0x0000000010594e40, const btGImpactShapeInterface * shape1=0x000000001253ce40)  Line 515 + 0x59 bytesC++<br> physik_bullet-d_1.dll!btGImpactCollisionAlgorithm::gimpact_vs_gimpact(const btCollisionObjectWrapper * body0Wrap=0x0000000013e0dd78, const btCollisionObjectWrapper * body1Wrap=0x0000000013e0ddb8, const btGImpactShapeInterface * shape0=0x0000000010594e40, const btGImpactShapeInterface * shape1=0x0000000012558e90)  Line 491C++<br> physik_bullet-d_1.dll!btGImpactCollisionAlgorithm::gimpact_vs_gimpact(const btCollisionObjectWrapper * body0Wrap=0x0000000013e0dd78, const btCollisionObjectWrapper * body1Wrap=0x0000000013e0ddb8, const btGImpactShapeInterface * shape0=0x0000000010664e90, const btGImpactShapeInterface * shape1=0x0000000012558e90)  Line 476C++<br> physik_bullet-d_1.dll!btGImpactCollisionAlgorithm::processCollision(const btCollisionObjectWrapper * body0Wrap=0x0000000013e0dd78, const btCollisionObjectWrapper * body1Wrap=0x0000000013e0ddb8, const btDispatcherInfo &amp; dispatchInfo={...}, btManifoldResult * resultOut=0x0000000013e0e9d8)  Line 889C++<br> physik_bullet-d_1.dll!btCompoundCompoundLeafCallback::Process(const btDbvtNode * leaf0=0x0000000010731f90, const btDbvtNode * leaf1=0x000000001250ef90)  Line 210C++<br> physik_bullet-d_1.dll!MycollideTT(const btDbvtNode * root0=0x0000000010731f90, const btDbvtNode * root1=0x000000001250ef90, const btTransform &amp; xform={...}, btCompoundCompoundLeafCallback * callback=0x0000000013e0e130)  Line 280C++<br> physik_bullet-d_1.dll!btCompoundCompoundCollisionAlgorithm::processCollision(const btCollisionObjectWrapper * body0Wrap=0x0000000013e0e958, const btCollisionObjectWrapper * body1Wrap=0x0000000013e0e998, const btDispatcherInfo &amp; dispatchInfo={...}, btManifoldResult * resultOut=0x0000000013e0e9d8)  Line 346C++<br> physik_bullet-d_1.dll!btCollisionDispatcher::defaultNearCallback(btBroadphasePair &amp; collisionPair={...}, btCollisionDispatcher &amp; dispatcher={...}, const btDispatcherInfo &amp; dispatchInfo={...})  Line 280C++<br> physik_bullet-d_1.dll!btCollisionPairCallback::processOverlap(btBroadphasePair &amp; pair={...})  Line 232C++<br> physik_bullet-d_1.dll!btHashedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback * callback=0x0000000013e0eae8, btDispatcher * dispatcher=0x0000000007ad56f0)  Line 387 + 0x15 bytesC++<br> physik_bullet-d_1.dll!btCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache * pairCache=0x0000000007297f70, const btDispatcherInfo &amp; dispatchInfo={...}, btDispatcher * dispatcher=0x0000000007ad56f0)  Line 244 + 0x1a bytesC++<br> physik_bullet-d_1.dll!btCollisionWorld::performDiscreteCollisionDetection()  Line 228 + 0x42 bytesC++<br> physik_bullet-d_1.dll!btDiscreteDynamicsWorld::internalSingleStepSimulation(double timeStep=0.016666666666666666)  Line 494C++<br> physik_bullet-d_1.dll!btDiscreteDynamicsWorld::stepSimulation(double timeStep=0.033333333333333333, int maxSubSteps=100, double fixedTimeStep=0.016666666666666666)  Line 453C++<br><br>The problem appears to be:<br><br>SIMD_FORCE_INLINE void buildTriPlane()<br>{<br>btVector3 normal = (m_vertices[1]-m_vertices[0]).cross(m_vertices[2]-m_vertices[0]);<br>normal.normalize();<br>m_plane.setValue(normal[0],normal[1],normal[2],m_vertices[0].dot(normal));<br>}<br><br>in Gimpact/btTriangleShapeEx.h<br><br>normal gets 0. I suspect it is the direction and distance to the other object..?<br><br>Anyway, is there any chance for a fix?<br><br>Cheers,<br>Moose<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=10538">Moose</a> — Mon Jan 13, 2014 4:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
