GithubHelp home page GithubHelp logo

bulletphysics / bullet3 Goto Github PK

View Code? Open in Web Editor NEW
11.9K 11.9K 2.8K 288.92 MB

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.

Home Page: http://bulletphysics.org

License: Other

CMake 1.18% C++ 84.31% C 12.65% Lua 0.92% Python 0.65% Shell 0.11% Batchfile 0.13% Makefile 0.04%
computer-animation game-development kinematics pybullet reinforcement-learning robotics simulation simulator virtual-reality

bullet3's People

Contributors

ahundt avatar araffin avatar benelot avatar bingjeff avatar blgene avatar crewmatt avatar dbartolini avatar elect86 avatar erwincoumans avatar fuchuyuan avatar glebm avatar goretkin avatar hellojas avatar jietan avatar jslee02 avatar lunkhound avatar makoenergy avatar manifoldfr avatar mbreyer avatar nicolaichuk avatar niranths avatar olegklimov avatar rantig avatar rtrius avatar stephengold avatar stolk avatar wenlonglu avatar xantares avatar xhan0619 avatar yunfeibai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bullet3's Issues

Install errors when using CMAKE

Hi,
There are a few install issues when using cmake:
$ cmake ../bullet3 -> works fine
$ make -> compiles fine
$ sudo make install -> issues:
CMake Error at cmake_install.cmake:42 (FILE):
file INSTALL cannot find
"/pathToBullet/bullet3/UseBullet.cmake".

and there are some others if commenting this particular file.

I have checked with the SVN v.2.82 and it works fine. Did you remove those files intentionally?

Regards

setFriction behaves incorrectly on OSX with Xcode 5.1 and Bullet 2.82

Sorry I posted on the old issue tracker.

What steps will reproduce the problem?

  1. Install Bullet 2.82 from brew (it compiles the lib with Clang Apple LLVM 5.1) ;
  2. Create a rigidBody, give it a mass and a collision shape ;
  3. Add a plan to collide with (more precisely, the ground is a cube in my test) ;
  4. Use setFriction on the rigidBody, with a value different from 0.

What is the expected output? What do you see instead?

The actual piece of code was behaving well with a Bullet built using Clang Apple LLVM 5.0 (Xcode 5.0). The object was harder to push, and slowed down when sliding.

Now, whenever a value different from 0 is given to setFriction, the object will start to slide as if it was pushed on ice, and even if there is no slope. The greater the value, the faster the sliding speed and acceleration. Behaves the same way with a negative value.
Also tried with values between 0 and 1, same issue.

What version of the product are you using? On what operating system?

Bullet version 2.82 on OSX Mavericks with Xcode 5.1.

The piece of code (mass is different from 0):

btVector3 fallInertia (0, 0, 0);
shipShape->calculateLocalInertia (mass, fallInertia);

btRigidBody::btRigidBodyConstructionInfo rigidBodyCI(mass, shippos, shipShape, fallInertia);
rigidBody_ = new btRigidBody(rigidBodyCI);
rigidBody_->setAngularFactor (0);
rigidBody_->setSleepingThresholds (0.0, 0.0);
rigidBody_->setRestitution (0);
rigidBody_->setFriction (0);
rigidBody_->forceActivationState (DISABLE_DEACTIVATION);

Add support for OpenCL CPU

Currently, some of the OpenCL kernels don't run on OpenCL CPU, due to certain workgroup size assumptions. It needs to be fixed.

GPU joint solving for non-contact constraints

Currently the GPU pipeline only supports constraint solving of contact constraints on the GPU. The non-contact constraints are solved on CPU, sequentially. It should be straight-forward to port the code over. The batching code can be re-used.

Improve collision performance for convex shapes with many edges (edge-edge case is slow)

Currently the GPU SAT clipping implementation for convex-convex collision detection only works fast between convexes with few edges, such as boxes and tetrahedra. Many edge-edge tests slows down the simulation a lot.
We could add a GJK/EPA style collision detection, with persistent contact caches.
Another thing to try it to use the Gauss map optimization, reducing the number of edge-edge cases.

Include linux build instructions

I cloned bullet3 but I can't figure out how to build it. Could you please provide some instructions? Does it also require Bullet2 ?

Frequent asserts in multi-thread dispatching after 2.82 (was googlecode Issue 798)

copied from https://code.google.com/p/bullet/issues/detail?id=798&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary

Reported by [email protected], Mar 13, 2014
I am seeing very frequent asserts (4 per pair per tick) when using a multi-threaded dispatcher that is related to a recent change from 2.81 to 2.82. The code that is directly causing the asserts was added in r2637. This does not happen in a single-threaded model.

The full path to the asserts starts in SpuCatheringCollisionTask.cpp around line 727 in ProcessSpuConvexConvexCollision() where two btConvexPointCloudShape are created on the stack. New btConvexPointCloudShape objects have m_isLocalAabbValid set to false by default. And the setPoints() function is invoked such that AABB recalculation is disabled. When these stack objects are eventually passed on to btGjkPairDetector::getClosestPoints() they have not had recalcLocalAabb() called and m_isLocalAabbValid is still false. This is causing the asserts to arise in the new code from r2637 which invokes getAabb() (line 454/457) on those collision objects.

I can work around this for now by setting m_fixContactNormalDirection in btGjkPairDetector to false. But I'd rather not since the description on the fix sounds rather important.

This happens both on ARMv7 (iOS) and x86/64 (OSX).

Add unit tests for all OpenCL kernels

There are new Unit Tests in the tests folder using the Google Test framework. Right now, there are tests that compile each OpenCL kernel, and a single unit test for executing a OpenCL kernel. Add support for executing and unit testing each OpenCL kernel.

llvm clang on apple gives unexpected results in some demo's and in blender (googlecode Issue 799)

copied from https://code.google.com/p/bullet/issues/detail?id=799&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary

Reported by martijn.berger, Mar 16, 2014
What steps will reproduce the problem?

  1. Use an apple clang based compiler on a mac OS X based system
  2. run ragdoll demo

What is the expected output? What do you see instead?
Puppets drop to the floor and stay there

instead puppets drop to the floor then speed of in a random direction

What version of the product are you using? On what operating system?
2.82 and 3.0 master from github.

Please provide any additional information below.

Implement collision filtering

Currently, collisions between all overlapping bodies is enabled by default in the GPU OpenCL rigid body pipeline. It would be good to enable filtering (selectively disable) collisions, for certain pairs of objects.

btTypedConstraint initialization

In 64-bit Bullet, m_userConstraintPtr becomes 64-bit and gets only partially initialized. This is because m_userConstraintId remains 32-bit and only m_userConstraintId is set to -1 during initialization.

union
{
int m_userConstraintId;
void* m_userConstraintPtr;
};

Here is a patch that initializes m_userConstraintPtr instead:
http://pastebin.com/AgwR4kRk

CF_NO_CONTACT_RESPONSE not honored if setSplitIslands set false (Googlecode Issue 800)

Copied from https://code.google.com/p/bullet/issues/detail?id=800&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary

What steps will reproduce the problem?

  1. Create a dynamics world (I was using btDiscreteDynamicsWorld).
  2. Call getSimulationIslandManager()->setSplitIslands(false) on the world.
  3. Create some number of objects with the flag CF_NO_CONTACT_RESPONSE.
  4. Note that collisions with said objects impart impulse.

What is the expected output? What do you see instead?
Objects with the CF_NO_CONTACT_RESPONSE flag should not impart or receive impulse from other objects.

What version of the product are you using? On what operating system?
2.82-rev2704

Please provide any additional information below.
The problem seems to lie with btSimulationIslandManager::buildAndProcessIslands. In the case that m_splitIslands is FALSE, the entire list of manifolds is sent to the processIsland function of the callback. I am attaching a patch that seems to fix the issue by using the m_islandmanifold array to hold a list of only those objects that pass the needsResponse check. That was already the process with the default setting for split islands.

merge Bullet 2.x CPU functionality into Bullet 3

The current OpenCL rigid body pipeline is not fully feature complete, and it doesn't run without OpenCL.

So we need to re-introduce and re-factor Bullet 2.x source code, and merge it into Bullet3.

It is started, we added all Bullet2/src/LinearMath, Bullet2/src/BulletCollision and Bullet2/src/BulletDynamics into Bullet3 src repo.

Demos, Extras, Gimpact, BulletMultiThreaded and BulletSoftBody is not added to Bullet 3: this functionality needs to be rewritten.

add object (de)activation system

Currently, all objects are simulation and never 'deactivated' when at rest. We need to re-introduce the sleeping/activation, similar to Bullet 2.

Debug Drawings cannot be turned off for individual soft body objects (was googlecode Issue 795)

copied from https://code.google.com/p/bullet/issues/detail?id=795&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary

Reported by Ashley.Whetter, Feb 21, 2014
What steps will reproduce the problem?

  1. Set up a bullet world with wireframe debug drawing enabled.
  2. Call
    softBody->setCollisionFlags(softBody->getCollisionFlags() | btCollisionObject::CF_DISABLE_VISUALIZE_OBJECT);
    on a btSoftBody object.

What is the expected output? What do you see instead?
I shouldn't be able to see a wireframe of the soft body but I do.

What version of the product are you using? On what operating system?
Bullet 2.8 (specifically svn revision 2531) on Arch Linux 64 bit.

Please provide any additional information below.
Sorry but I don't have a test case for this. I've only ever used bullet through the Python interface of Panda3D. The only test case I have is the one on this Panda3D bug: https://bugs.launchpad.net/panda3d/+bug/1282729
A potential fix has been suggest on the bug as well.

btCollisionWorld::debugDrawWorld() checks the CF_DISABLE_VISUALIZE_OBJECT flag for each collision object befor calling the Draw method for the collision object.

For me it seems reasonable to do such a check in btSoftRigidDynamicsWorld::debugDrawWorld() too, before calling the Draw method for the soft body object. After all btSoftBody is a btCollisionObject (inheritance).

NEON/multithreaded/Android contributions to PhysicsEffects

Erwin,

As discussed previously, I am ready to provide to you our contributions to PhysicsEffects, which add pthreads/multithreading support, some support for SIMD using the ARM NEON instruction set, and support to build the samples for Android devices.

For legal reasons, I am only able to deliver files that we either created or modified, so this is only a partial file set. There is a README file that indicates merge concerns and a list of new files and folders that we created. The files should be merged onto an existing branch (e.g. perhaps for now a new experimental branch).

I did not attempt to update cmake configuration files. Please see README_Android.txt in the zip file to understand how to configure and build the Android samples.

Warm Regards,

Graham Rhodes
Applied Research Associates, Inc.

setFriction behaves incorrectly on OSX with Xcode 5.1 and Bullet 2.82 (googlecode Issue 801)

Copied from https://code.google.com/p/bullet/issues/detail?id=801&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary

What steps will reproduce the problem?

  1. Install Bullet 2.82 from brew (compile the lib with Clang Apple LLVM 5.1) ;
  2. Create a rigidBody, give it a mass and a collision shape ;
  3. Add a plan to collide with (ground) ;
  4. Use setFriction on the rigidBody, with a value different from 0.

What is the expected output? What do you see instead?

The actual piece of code was behaving well with a Bullet built using Clang Apple LLVM 5.0 (Xcode 5.0). The object was harder to push, and slowed down when sliding.

Now, whenever a value different from 0 is given to setFriction, the object will start to slide as if it was on ice, and even if there is no slope. The greater the value, the faster the sliding speed. Behaves the same way with a negative value, but in the opposite direction (seems to be positive/negative x on my test).

What version of the product are you using? On what operating system?

Bullet version 2.82 on OSX Mavericks with Xcode 5.1.

The piece of code (mass is different from 0):

btVector3 fallInertia (0, 0, 0);
shipShape->calculateLocalInertia (mass, fallInertia);

btRigidBody::btRigidBodyConstructionInfo rigidBodyCI(mass, shippos, shipShape, fallInertia);
rigidBody_ = new btRigidBody(rigidBodyCI);
rigidBody_->setAngularFactor (0);
rigidBody_->setSleepingThresholds (0.0, 0.0);
rigidBody_->setRestitution (0);
rigidBody_->setFriction (0);
rigidBody_->forceActivationState (DISABLE_DEACTIVATION);

Feature request: btHingeConstraint::getHingeAngleUnwrapped

The btHingeConstraint::getHingeAngle() function always returns values wrapped to [-PI,PI]. It would be nice to have an unwrapped angle. We patched Gazebo's internal copy of ODE to return unwrapped angles for hinge joints (see hinge.cpp). We should try to push that back upstream to ODE and potentially here to bullet if the implementation is reasonable to you.

Migrated from google code.

GCC 4.8+ internal compiler error: Segmentation fault

What steps will reproduce the problem?

  1. Fresh clone from repository of 3.x version or the 2.x version
  2. GCC 4.8+ (http://nuwen.net/mingw.html version 10.4 x86 used on Windows OS)
  3. CMake 2.8+ using either Code::Blocks MinGW make or MinGW make files (NO Demos, CPU Demos, Extras, Multithreading, Unit Tests, Custom Vector Math, Double Precission or GLUT, just the core libraries)
  4. Build type: Release (anything that has -O2 or -O3)
  5. That's it. Start building. cc1plus.exe will segfault on btInternalEdgeUtility.cpp:310:2

NOTE: The library compiles fine without any optimizations.

What is the expected output? What do you see instead?

  • cc1plus sould exit without segfaulting.
  • cc1plus exits segfaulting.

What version of the product are you using? On what operating system?

  • Fresh 2.x repository clone at revision r2722 (same problem with official releases or previous revisions) same for 3.x
  • Windows 7 or XP

Please provide any additional information below.

D:\Dev\CMake\bin\cmake.exe -E cmake_progress_report D:\DevLibs\bullet-read-only\build-cb\CMakeFiles 19
[ 25%] 
Building CXX object src/BulletCollision/CMakeFiles/BulletCollision.dir/CollisionDispatch/btHashedSimplePairCache.obj
cd /d D:\DevLibs\bullet-read-only\build-cb\src\BulletCollision && D:\Dev\MinGW\bin\g++.exe   -DUSE_GRAPHICAL_BENCHMARK -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_IRR_STATIC_LIB_ -D_SCL_SECURE_NO_WARNINGS -O3 -DNDEBUG @CMakeFiles/BulletCollision.dir/includes_CXX.rsp   -o CMakeFiles\BulletCollision.dir\CollisionDispatch\btHashedSimplePairCache.obj -c D:\DevLibs\bullet-read-only\src\BulletCollision\CollisionDispatch\btHashedSimplePairCache.cpp
D:\Dev\CMake\bin\cmake.exe -E cmake_progress_report D:\DevLibs\bullet-read-only\build-cb\CMakeFiles 
[ 25%] 
Building CXX object src/BulletCollision/CMakeFiles/BulletCollision.dir/CollisionDispatch/btInternalEdgeUtility.obj
cd /d D:\DevLibs\bullet-read-only\build-cb\src\BulletCollision && D:\Dev\MinGW\bin\g++.exe   -DUSE_GRAPHICAL_BENCHMARK -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_IRR_STATIC_LIB_ -D_SCL_SECURE_NO_WARNINGS -O3 -DNDEBUG @CMakeFiles/BulletCollision.dir/includes_CXX.rsp   -o CMakeFiles\BulletCollision.dir\CollisionDispatch\btInternalEdgeUtility.obj -c D:\DevLibs\bullet-read-only\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.cpp
D:\DevLibs\bullet-read-only\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.cpp: In member function 'virtual void btConnectivityProcessor::processTriangle(btVector3*, int, int)':
D:\DevLibs\bullet-read-only\src\BulletCollision\CollisionDispatch\btInternalEdgeUtility.cpp:310:2: internal compiler error: Segmentation fault
  }
  ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
mingw32-make.exe[2]: *** [src/BulletCollision/CMakeFiles/BulletCollision.dir/CollisionDispatch/btInternalEdgeUtility.obj] Error 1
mingw32-make.exe[1]: *** [src/BulletCollision/CMakeFiles/BulletCollision.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
mingw32-make.exe[2]: Leaving directory `D:/DevLibs/bullet-read-only/build-cb'
mingw32-make.exe[1]: Leaving directory `D:/DevLibs/bullet-read-only/build-cb'
Process terminated with status 2 (1 minute(s), 14 second(s))
1 error(s), 0 warning(s) (1 minute(s), 14 second(s))

AMD Radeon HD 6770M 1024MB MBP under OSX_10 8.5 Problematic

Hi,

I was curious if you have had issues with other AMD GPUs? I have two MBPs with Nvidia GPUs and everything works well,

The kernels that are problematic are simple enough,

If your interested i could provide debug info as i traced it to specific calls,

Feel free to close if this is not of concern,

Collission Issue with Cylinders (was googlecode Issue 797)

for more details, see old googlecode issue https://code.google.com/p/bullet/issues/detail?id=797&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary

What steps will reproduce the problem?

  1. Use attached files to reproduce failing collision between frustum and cylinder

What is the expected output? What do you see instead?
There should be a contact response for the two objects but instead there is not any.

What version of the product are you using? On what operating system?
Windows 7 x64, bullet-2.82-r2704

Please provide any additional information below.
I have a couple of objects in my world ranging from 3D points, cylinders, cones, spheres,circles etc...

When performing single click, instead of ray casting I create a rectangle of 10x10 pixels centered on the mouse click in order to increase the selection area. From this rectangle I get the 4 x near and 4 x far frustum 3D points from opengl and create a convex. Then perform collision detection of the convex object and my object in this case cylinder.

What I have seen is that I can click on the cylinder and it will most of the times be OK, however there will be locations on the cylinder that I essentially get no contact.

If I click on the surrounding pixels of the one that fails, everything is fine so its pretty weird that in a specific location I dont get a contact while when click somewhere really close all is good.

There might be more shapes affected from what I remember but will have to find them and reproduce them.

Just as a screenshot example I am providing the frustum and cylinder collision. As I said, if I click on any of surrounding pixels everything is fine.

The screenshot is different from the attached reproduction case as I was trying to simplify as much has possible. This, I have hard-coded the frustum and cylinder values as that was simpler for me to provide than creating cameras taking care of rotations etc...

Could it be a degenerate case ?

The btGpuDynamicWorld class

Hi, everybody:

I have a question: is the btGpuDynamicWorld still worked?

In the old version, experiment, these demo applications communicate with bullet by the btGpuDynamicWorld interface inheriting the btDynamicWorld class, and programmers can switch the GPU computation to the CPU computation by changing the btGpuDynamicWorld to btCpuDynamicWorld easily.

In the new version, bullet3. broadphase, narrowphase and so on are viewed as components, and the demo applications triggers these components sequentially, not calling the btGpuDynamicWorld interface anymore.

My question is whether the btGpuDynamicWorld interface in the demo3/BasicGpuDemo is still worked or not. For porting my existent demo application, I want to use the btGpuDynamicWorld interface.

OS:Ubuntu 12.10 64bit, graphic card: AMD Radeon HD 7850, AMD catalyst 13.4 driver, AMDAPP 2.8

Thanks

Where is 'Hello World' sample ?

I Just studied bullet2.x and quite happy for basic sample projects.
Especially 'hello world' demo..
Isn't there demo for bullet3.x just like 'hello world' basic demo ?

Feature Request: ways to customize raytests

I've been able to successfully implement my own collision algorithm for a dynamic shape, via processCollision. But now I'm really struggling with support for raycasts, because there appears to be no similar system to customize. Ultimately, I'd love to just have a processRaycast method that I could customize, since the structure I'm wrapping already has implementations I could use. Rather than making a new RaycastAlgorithm system though, I'd imagine a new shape type. I wouldn't request that such a thing be added to the core shape interface, but perhaps a new shape type interface to join the current 3 main branches (compound, convex, concave). Just something simple that defers to a virtual method for most every interaction with default implementations just hooking back into the same old Bullet system?

concave shape handler only handles concave versus *, not * versus concave

When adding dynamic/convex/compound shapes before concave shapes, the collision detection fails. This is because the OpenCL collision pair handler assumes the concave shape to be the first one in the overlapping pair. We need to add the symmetric case (*,concave).

It should be simple to fix.

[PATCH] Missing zero-argument constructors (was googlecode Issue 788)

copied form https://code.google.com/p/bullet/issues/detail?id=788&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary
see for patch/discussion there

Several methods of btAlignedObjectArray (including one of the constructors), assume that the contained type has a callable zero-argument constructor. However, a few of the types used with btAlignedObjectArray in various places do not meet this requirement (specifically sStkNP, btHashInt, btHashString, btHashPtr, and btWheelInfo).

(This is particularly problematic because I am attempting to create a language binding for Bullet in PyPy using cppyy, and these instantiation issues cause the whole compilation to bomb out if not corrected.)

Attached is a patch (against SVN head) to fix this problem in the headers. In the case of sStkNP, I added a zero-argument constructor consistent with the ones that were already there for the other sStkN* classes. In the case of the btHash* classes, I just added default values to use if no arguments were supplied. For btWheelInfo I added an empty constructor for btAlignedObjectArray to call (since it's only called in cases where the data for the entry is going to be overwritten anyway, leaving the data members uninitialized in this case did not seem to be a big issue)..

b3QuickProf files are missing

The directory "btgui/Timing" is NOT added into the github repository, so the compilation failed.

Please upload the directory.

Thanks

Compile error

b3RadixSort32CL.cpp
1>....\src\Bullet3OpenCL/Initialize/b3OpenCLInclude.h(34): fatal error C1083: Cannot open include file: 'CL/cl.h': No such file or directory (....\src\Bullet3OpenCL\BroadphaseCollision\b3GpuSapBroadphase.cpp)
1>....\src\Bullet3OpenCL/Initialize/b3OpenCLInclude.h(34): fatal error C1083: Cannot open include file: 'CL/cl.h': No such file or directory (....\src\Bullet3OpenCL\ParallelPrimitives\b3BoundSearchCL.cpp)

This error happens when compile with VS2012.
maybe cl.h missed..
What should I do ??

Add acceleration structure for compound collision shapes

Right now, all children/child shapes are tested brute force, when colliding against a compound collision shape. We need to add some acceleration structure, such as an AABB tree. Possibly add the quantized AABB tree, and add a tree versus tree.

fix overflow in parallel CreateBatches/batchingKernel

There is no proper mechanism to deal with constraints that cannot be batched. We need a better batching, and explicitly report the maximum number of generated batches.

Currently the parallel batching kernel is disabled, so only a single thread in a warp deals with batching.

Compound-Compound collision crash

Using commit with hash ec39c2f
'Removed to bitonic sort and ios...' (25 November 2013)
of the master branch, unmodified, with platform:

Radeon HD5850
Catalyst 13.9
AMD APP SDK 2.9 (clew version also crashes)

Visual C++ 2008
Windows 7 x64

When two compound objects begin to collide, it crashes the GPU driver.

In the CompoundOnPlane demo, the compound rigids collide with the plane without crashing. The crash consistently occurs just as the compound objects begin to touch. Only 2 compound rigid bodies are needed to reproduce the crash (--x_dim=1 --y_dim=2 --z_dim=1). Additionally, when running the CompoundOnPlane demo with parameters x_dim=10 y_dim=1 z_dim=10, the compounds collide with the plane, settle, and there is no issue.

There does not seem to be any issue with Compound-Sphere and
Compound-Trimesh collision.

Disabling interactions with compound rigids prevents the crash,
so the issue is probably caused by one of these kernels(b3ConvexHullContact.h):
m_findCompoundPairsKernel
m_processCompoundPairsKernel
m_clipCompoundsHullHullKernel
m_processCompoundPairsPrimitivesKernel

Disabling collisions for objects with childShapes in
m_clipCompoundsHullHullKernel, and
m_processCompoundPairsKernel
by adding:
if( childShapeIndexA >= 0 && childShapeIndexB >= 0 )return;
has no effect, so these kernels are probably not the cause.

The lack of issues with Compound-Sphere/Trimesh/Plane collision suggests that m_processCompoundPairsPrimitivesKernel has no issue.

As a result, the cause is most likely m_findCompoundPairsKernel. Surrounding the launch1D() and clFinish() of these 4 kernels with printf and flushing the output also supports this explanation; the crash occurs just as findCompoundPairsKernel is executed. Furthermore, if the if branch on line 924 of findCompoundPairsKernel (sat.cl) is not run, the crash does not occur.

I'll make another post after some more investigation.

error.log:

main startVersion = 4.2.12430 Compatibility Profile Context 13.152.1.8000
Vendor = ATI Technologies Inc.

Renderer = AMD Radeon HD 5800 Series

started GwenUserInterfaceinit fontsnumDevices=1
compiling kernel copyTransformsToVBOKernel ready.
clBuildProgram successfully compiled cached binary: cache/sat.cl.Cypress.1268.1 (VM).bin
compiling kernel findSeparatingAxisKernel ready.
compiling kernel findConcaveSeparatingAxisKernel ready.
compiling kernel findCompoundPairsKernel ready.
compiling kernel processCompoundPairsKernel ready.
clBuildProgram successfully compiled cached binary: cache/satClipHullContacts.cl.Cypress.1268.1 (VM).bin
compiling kernel clipHullHullKernel ready.
compiling kernel clipCompoundsHullHullKernel ready.
compiling kernel findClippingFacesKernel ready.
compiling kernel clipFacesAndFindContactsKernel ready.
compiling kernel clipHullHullConcaveConvexKernel ready.
compiling kernel extractManifoldAndAddContactKernel ready.
compiling kernel newContactReductionKernel ready.
clBuildProgram successfully compiled cached binary: cache/bvhTraversal.cl.Cypress.1268.1 (VM).bin
compiling kernel bvhTraversalKernel ready.
clBuildProgram successfully compiled cached binary: cache/primitiveContacts.cl.Cypress.1268.1 (VM).bin
compiling kernel primitiveContactsKernel ready.
compiling kernel findConcaveSphereContactsKernel ready.
compiling kernel processCompoundPairsPrimitivesKernel ready.
clBuildProgram successfully compiled cached binary: cache/sap.cl.Cypress.1268.1 (VM).bin
clBuildProgram successfully compiled cached binary: cache/sapFast.cl.Cypress.1268.1 (VM).bin
clBuildProgram successfully compiled cached binary: cache/PrefixScanFloat4Kernels.cl.Cypress.1268.1 (VM).bin
compiling kernel LocalScanKernel ready.
compiling kernel TopLevelScanKernel ready.
compiling kernel AddOffsetKernel ready.
compiling kernel computePairsKernelTwoArrays ready.
compiling kernel prepareSumVarianceKernel ready.
compiling kernel computePairsIncremental3dSapKernel ready.
compiling kernel computePairsKernel ready.
compiling kernel flipFloatKernel ready.
compiling kernel copyAabbsKernel ready.
compiling kernel scatterKernel ready.
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel LocalScanKernel ready.
compiling kernel TopLevelScanKernel ready.
compiling kernel AddOffsetKernel ready.
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel FillIntKernel ready.
compiling kernel FillUnsignedIntKernel ready.
compiling kernel FillFloatKernel ready.
compiling kernel FillInt2Kernel ready.
clBuildProgram successfully compiled cached binary: cache/RadixSort32Kernels.cl.Cypress.1268.1 (VM).bin
compiling kernel StreamCountSortDataKernel ready.
compiling kernel StreamCountKernel ready.
compiling kernel SortAndScatterSortDataKernel ready.
compiling kernel SortAndScatterKernel ready.
compiling kernel PrefixScanKernel ready.
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel LocalScanKernel ready.
compiling kernel TopLevelScanKernel ready.
compiling kernel AddOffsetKernel ready.
clBuildProgram successfully compiled cached binary: cache/jointSolver.cl.Cypress.1268.1 (VM).bin
compiling kernel solveJointConstraintRows ready.
compiling kernel initSolverBodies ready.
compiling kernel getInfo1Kernel ready.
compiling kernel initBatchConstraintsKernel ready.
compiling kernel getInfo2Kernel ready.
compiling kernel writeBackVelocitiesKernel ready.
compiling kernel breakViolatedConstraintsKernel ready.
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel LocalScanKernel ready.
compiling kernel TopLevelScanKernel ready.
compiling kernel AddOffsetKernel ready.
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel FillIntKernel ready.
compiling kernel FillUnsignedIntKernel ready.
compiling kernel FillFloatKernel ready.
compiling kernel FillInt2Kernel ready.
clBuildProgram successfully compiled cached binary: cache/solverUtils.cl.Cypress.1268.1 (VM).bin
compiling kernel CountBodiesKernel ready.
compiling kernel ContactToConstraintSplitKernel ready.
compiling kernel ClearVelocitiesKernel ready.
compiling kernel AverageVelocitiesKernel ready.
compiling kernel UpdateBodyVelocitiesKernel ready.
compiling kernel SolveContactJacobiKernel ready.
compiling kernel SolveFrictionJacobiKernel ready.
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel LocalScanKernel ready.
compiling kernel TopLevelScanKernel ready.
compiling kernel AddOffsetKernel ready.
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel FillIntKernel ready.
compiling kernel FillUnsignedIntKernel ready.
compiling kernel FillFloatKernel ready.
compiling kernel FillInt2Kernel ready.
clBuildProgram successfully compiled cached binary: cache/RadixSort32Kernels.cl.Cypress.1268.1 (VM).bin
compiling kernel StreamCountSortDataKernel ready.
compiling kernel StreamCountKernel ready.
compiling kernel SortAndScatterSortDataKernel ready.
compiling kernel SortAndScatterKernel ready.
compiling kernel PrefixScanKernel ready.
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel LocalScanKernel ready.
compiling kernel TopLevelScanKernel ready.
compiling kernel AddOffsetKernel ready.
clBuildProgram successfully compiled cached binary: cache/BoundSearchKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel SearchSortDataLowerKernel ready.
compiling kernel SearchSortDataUpperKernel ready.
compiling kernel SubtractKernel ready.
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel FillIntKernel ready.
compiling kernel FillUnsignedIntKernel ready.
compiling kernel FillFloatKernel ready.
compiling kernel FillInt2Kernel ready.
clBuildProgram successfully compiled cached binary: cache/solveContact.cl.Cypress.1268.1 (VM).bin
clBuildProgram successfully compiled cached binary: cache/solveFriction.cl.Cypress.1268.1 (VM).bin
clBuildProgram successfully compiled cached binary: cache/solverSetup2.cl.Cypress.1268.1 (VM).bin
clBuildProgram successfully compiled cached binary: cache/solverSetup.cl.Cypress.1268.1 (VM).bin
compiling kernel BatchSolveKernelFriction ready.
compiling kernel BatchSolveKernelContact ready.
compiling kernel ContactToConstraintKernel ready.
compiling kernel SetSortDataKernel ready.
compiling kernel ReorderContactKernel ready.
compiling kernel CopyConstraintKernel ready.
clBuildProgram successfully compiled cached binary: cache/batchingKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel CreateBatches ready.
clBuildProgram successfully compiled cached binary: cache/batchingKernelsNew.cl.Cypress.1268.1 (VM).bin
compiling kernel CreateBatchesNew ready.
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel LocalScanKernel ready.
compiling kernel TopLevelScanKernel ready.
compiling kernel AddOffsetKernel ready.
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel FillIntKernel ready.
compiling kernel FillUnsignedIntKernel ready.
compiling kernel FillFloatKernel ready.
compiling kernel FillInt2Kernel ready.
clBuildProgram successfully compiled cached binary: cache/RadixSort32Kernels.cl.Cypress.1268.1 (VM).bin
compiling kernel StreamCountSortDataKernel ready.
compiling kernel StreamCountKernel ready.
compiling kernel SortAndScatterSortDataKernel ready.
compiling kernel SortAndScatterKernel ready.
compiling kernel PrefixScanKernel ready.
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel LocalScanKernel ready.
compiling kernel TopLevelScanKernel ready.
compiling kernel AddOffsetKernel ready.
clBuildProgram successfully compiled cached binary: cache/BoundSearchKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel SearchSortDataLowerKernel ready.
compiling kernel SearchSortDataUpperKernel ready.
compiling kernel SubtractKernel ready.
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel FillIntKernel ready.
compiling kernel FillUnsignedIntKernel ready.
compiling kernel FillFloatKernel ready.
compiling kernel FillInt2Kernel ready.
clBuildProgram successfully compiled cached binary: cache/solveContact.cl.Cypress.1268.1 (VM).bin
clBuildProgram successfully compiled cached binary: cache/solveFriction.cl.Cypress.1268.1 (VM).bin
clBuildProgram successfully compiled cached binary: cache/solverSetup2.cl.Cypress.1268.1 (VM).bin
clBuildProgram successfully compiled cached binary: cache/solverSetup.cl.Cypress.1268.1 (VM).bin
compiling kernel BatchSolveKernelFriction ready.
compiling kernel BatchSolveKernelContact ready.
compiling kernel solveSingleContactKernel ready.
compiling kernel solveSingleFrictionKernel ready.
compiling kernel ContactToConstraintKernel ready.
compiling kernel SetSortDataKernel ready.
compiling kernel SetDeterminismSortDataBodyA ready.
compiling kernel SetDeterminismSortDataBodyB ready.
compiling kernel SetDeterminismSortDataChildShapeA ready.
compiling kernel SetDeterminismSortDataChildShapeB ready.
compiling kernel ReorderContactKernel ready.
compiling kernel CopyConstraintKernel ready.
clBuildProgram successfully compiled cached binary: cache/batchingKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel CreateBatches ready.
clBuildProgram successfully compiled cached binary: cache/batchingKernelsNew.cl.Cypress.1268.1 (VM).bin
compiling kernel CreateBatchesNew ready.
clBuildProgram successfully compiled cached binary: cache/rayCastKernels.cl.Cypress.1268.1 (VM).bin
compiling kernel rayCastKernel ready.
clBuildProgram successfully compiled cached binary: cache/integrateKernel.cl.Cypress.1268.1 (VM).bin
compiling kernel integrateTransformsKernel ready.
clBuildProgram successfully compiled cached binary: cache/updateAabbsKernel.cl.Cypress.1268.1 (VM).bin

compiling kernel initializeGpuAabbsFull ready.

Demo settings:
SelectedDemo=5, demoname = CompoundOnPlane
x_dim=1, y_dim=2, z_dim=1
x_gap=16.299999, y_gap=6.300000, z_gap=16.299999

OpenCL settings:
Preferred cl_device index -1
Preferred cl_platform index-1

Platform info:
CL_PLATFORM_VENDOR: Advanced Micro Devices, Inc.
CL_PLATFORM_NAME: AMD Accelerated Parallel Processing
CL_PLATFORM_VERSION: OpenCL 1.2 AMD-APP (1268.1)

Device Info:
CL_DEVICE_NAME: Cypress
CL_DEVICE_VENDOR: Advanced Micro Devices, Inc.
CL_DRIVER_VERSION: 1268.1 (VM)
CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU
CL_DEVICE_MAX_COMPUTE_UNITS: 18
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
CL_DEVICE_MAX_WORK_ITEM_SIZES: 256 / 256 / 256
CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
CL_DEVICE_MAX_CLOCK_FREQUENCY: 765 MHz
CL_DEVICE_ADDRESS_BITS: 32
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 512 MByte
CL_DEVICE_GLOBAL_MEM_SIZE: 1024 MByte
CL_DEVICE_ERROR_CORRECTION_SUPPORT: no
CL_DEVICE_LOCAL_MEM_TYPE: local
CL_DEVICE_LOCAL_MEM_SIZE: 32 KByte
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64 KByte
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_PROFILING_ENABLE
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8

CL_DEVICE_IMAGE 2D_MAX_WIDTH 16384
2D_MAX_HEIGHT 16384
3D_MAX_WIDTH 2048
3D_MAX_HEIGHT 2048
3D_MAX_DEPTH 2048

CL_DEVICE_EXTENSIONS:cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_atomic_counters_32 cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_media_ops2 cl_amd_popcnt

add GPU cloth simulation

Position based dynamics (as in Bullet 2.x) and possibly better methods, such as Baraff's implicit integration + conjugate gradient.

add CMake support for Bullet 3

Right now, cmake only creates obsolete Bullet 2 projects,
add support for building Bullet 3.x files (OpenCL mainly at the moment, will become merged this year)

Several Fixes for btkinematiccharactercontroller

I'm currently having a lot of problems with the btkinematiccharactercontroller. He slides down slopes, when he walks towards a narrow corner, he starts hammering, it is possible to glitch through a wall and he can't use elevator platforms.
I hope it gets fixed soon, because I think a player character is pretty essential for a physics engine.

Demo crashes on Ubuntu 12.04

Followed build instructions. Demo crashes. Unfortunately there's no backtrace. How do I tell the build script to do a debug build?

gdb ./bin/App_Bullet3_OpenCL_Demos_clew_gmake_x64_release 
runGNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/scrawl/Dev/bullet3/bin/App_Bullet3_OpenCL_Demos_clew_gmake_x64_release...
(no debugging symbols found)...done.
(gdb) run
Starting program: /home/scrawl/Dev/bullet3/bin/App_Bullet3_OpenCL_Demos_clew_gmake_x64_release 
Traceback (most recent call last):
  File "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18-gdb.py", line 59, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named libstdcxx.v6.printers
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
main start
    visual 0x27 selected
GL_VENDOR=NVIDIA Corporation
GL_RENDERER=GeForce GTX 560 Ti/PCIe/SSE2
GL_VERSION=4.3.0 NVIDIA 319.32
GL_SHADING_LANGUAGE_VERSION=4.30 NVIDIA via Cg compiler
-----------------------------------------------------
started GwenUserInterfaceinit fontsclewInit succesfull using libOpenCL.so.1
numDevices=1
[New Thread 0x7fffe5d96700 (LWP 15563)]
[New Thread 0x7fffe488f700 (LWP 15564)]
[New Thread 0x7fffe408e700 (LWP 15565)]
[New Thread 0x7fffe388d700 (LWP 15566)]
[New Thread 0x7fffe308c700 (LWP 15567)]
[New Thread 0x7fffe288b700 (LWP 15568)]
compiling kernel copyTransformsToVBOKernel ready. 
clBuildProgram successfully compiled cached binary: cache/sat.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel findSeparatingAxisKernel ready. 
compiling kernel findConcaveSeparatingAxisKernel ready. 
compiling kernel findCompoundPairsKernel ready. 
compiling kernel processCompoundPairsKernel ready. 
clBuildProgram successfully compiled cached binary: cache/satClipHullContacts.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel clipHullHullKernel ready. 
compiling kernel clipCompoundsHullHullKernel ready. 
compiling kernel findClippingFacesKernel ready. 
compiling kernel clipFacesAndContactReductionKernel ready. 
compiling kernel clipHullHullConcaveConvexKernel ready. 
compiling kernel extractManifoldAndAddContactKernel ready. 
compiling kernel newContactReductionKernel ready. 
clBuildProgram successfully compiled cached binary: cache/bvhTraversal.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel bvhTraversalKernel ready. 
clBuildProgram successfully compiled cached binary: cache/primitiveContacts.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel primitiveContactsKernel ready. 
compiling kernel findConcaveSphereContactsKernel ready. 
compiling kernel processCompoundPairsPrimitivesKernel ready. 
clBuildProgram successfully compiled cached binary: cache/sap.cl.GeForce GTX 560 Ti.319.32.bin
clBuildProgram successfully compiled cached binary: cache/sapFast.cl.GeForce GTX 560 Ti.319.32.bin
clBuildProgram successfully compiled cached binary: cache/PrefixScanFloat4Kernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel LocalScanKernel ready. 
compiling kernel TopLevelScanKernel ready. 
compiling kernel AddOffsetKernel ready. 
compiling kernel computePairsKernelTwoArrays ready. 
compiling kernel prepareSumVarianceKernel ready. 
compiling kernel computePairsIncremental3dSapKernel ready. 
compiling kernel computePairsKernel ready. 
compiling kernel flipFloatKernel ready. 
compiling kernel copyAabbsKernel ready. 
compiling kernel scatterKernel ready. 
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel LocalScanKernel ready. 
compiling kernel TopLevelScanKernel ready. 
compiling kernel AddOffsetKernel ready. 
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel FillIntKernel ready. 
compiling kernel FillUnsignedIntKernel ready. 
compiling kernel FillFloatKernel ready. 
compiling kernel FillInt2Kernel ready. 
clBuildProgram successfully compiled cached binary: cache/RadixSort32Kernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel StreamCountSortDataKernel ready. 
compiling kernel StreamCountKernel ready. 
compiling kernel SortAndScatterSortDataKernel ready. 
compiling kernel SortAndScatterKernel ready. 
compiling kernel PrefixScanKernel ready. 
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel LocalScanKernel ready. 
compiling kernel TopLevelScanKernel ready. 
compiling kernel AddOffsetKernel ready. 
clBuildProgram successfully compiled cached binary: cache/jointSolver.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel solveJointConstraintRows ready. 
compiling kernel initSolverBodies ready. 
compiling kernel getInfo1Kernel ready. 
compiling kernel initBatchConstraintsKernel ready. 
compiling kernel getInfo2Kernel ready. 
compiling kernel writeBackVelocitiesKernel ready. 
compiling kernel breakViolatedConstraintsKernel ready. 
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel LocalScanKernel ready. 
compiling kernel TopLevelScanKernel ready. 
compiling kernel AddOffsetKernel ready. 
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel FillIntKernel ready. 
compiling kernel FillUnsignedIntKernel ready. 
compiling kernel FillFloatKernel ready. 
compiling kernel FillInt2Kernel ready. 
clBuildProgram successfully compiled cached binary: cache/solverUtils.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel CountBodiesKernel ready. 
compiling kernel ContactToConstraintSplitKernel ready. 
compiling kernel ClearVelocitiesKernel ready. 
compiling kernel AverageVelocitiesKernel ready. 
compiling kernel UpdateBodyVelocitiesKernel ready. 
compiling kernel SolveContactJacobiKernel ready. 
compiling kernel SolveFrictionJacobiKernel ready. 
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel LocalScanKernel ready. 
compiling kernel TopLevelScanKernel ready. 
compiling kernel AddOffsetKernel ready. 
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel FillIntKernel ready. 
compiling kernel FillUnsignedIntKernel ready. 
compiling kernel FillFloatKernel ready. 
compiling kernel FillInt2Kernel ready. 
clBuildProgram successfully compiled cached binary: cache/RadixSort32Kernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel StreamCountSortDataKernel ready. 
compiling kernel StreamCountKernel ready. 
compiling kernel SortAndScatterSortDataKernel ready. 
compiling kernel SortAndScatterKernel ready. 
compiling kernel PrefixScanKernel ready. 
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel LocalScanKernel ready. 
compiling kernel TopLevelScanKernel ready. 
compiling kernel AddOffsetKernel ready. 
clBuildProgram successfully compiled cached binary: cache/BoundSearchKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel SearchSortDataLowerKernel ready. 
compiling kernel SearchSortDataUpperKernel ready. 
compiling kernel SubtractKernel ready. 
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel FillIntKernel ready. 
compiling kernel FillUnsignedIntKernel ready. 
compiling kernel FillFloatKernel ready. 
compiling kernel FillInt2Kernel ready. 
clBuildProgram successfully compiled cached binary: cache/solveContact.cl.GeForce GTX 560 Ti.319.32.bin
clBuildProgram successfully compiled cached binary: cache/solveFriction.cl.GeForce GTX 560 Ti.319.32.bin
clBuildProgram successfully compiled cached binary: cache/solverSetup2.cl.GeForce GTX 560 Ti.319.32.bin
clBuildProgram successfully compiled cached binary: cache/solverSetup.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel BatchSolveKernelFriction ready. 
compiling kernel BatchSolveKernelContact ready. 
compiling kernel ContactToConstraintKernel ready. 
compiling kernel SetSortDataKernel ready. 
compiling kernel ReorderContactKernel ready. 
compiling kernel CopyConstraintKernel ready. 
clBuildProgram successfully compiled cached binary: cache/batchingKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel CreateBatches ready. 
clBuildProgram successfully compiled cached binary: cache/batchingKernelsNew.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel CreateBatchesNew ready. 
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel LocalScanKernel ready. 
compiling kernel TopLevelScanKernel ready. 
compiling kernel AddOffsetKernel ready. 
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel FillIntKernel ready. 
compiling kernel FillUnsignedIntKernel ready. 
compiling kernel FillFloatKernel ready. 
compiling kernel FillInt2Kernel ready. 
clBuildProgram successfully compiled cached binary: cache/RadixSort32Kernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel StreamCountSortDataKernel ready. 
compiling kernel StreamCountKernel ready. 
compiling kernel SortAndScatterSortDataKernel ready. 
compiling kernel SortAndScatterKernel ready. 
compiling kernel PrefixScanKernel ready. 
clBuildProgram successfully compiled cached binary: cache/PrefixScanKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel LocalScanKernel ready. 
compiling kernel TopLevelScanKernel ready. 
compiling kernel AddOffsetKernel ready. 
clBuildProgram successfully compiled cached binary: cache/BoundSearchKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel SearchSortDataLowerKernel ready. 
compiling kernel SearchSortDataUpperKernel ready. 
compiling kernel SubtractKernel ready. 
clBuildProgram successfully compiled cached binary: cache/FillKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel FillIntKernel ready. 
compiling kernel FillUnsignedIntKernel ready. 
compiling kernel FillFloatKernel ready. 
compiling kernel FillInt2Kernel ready. 
clBuildProgram successfully compiled cached binary: cache/solveContact.cl.GeForce GTX 560 Ti.319.32.bin
clBuildProgram successfully compiled cached binary: cache/solveFriction.cl.GeForce GTX 560 Ti.319.32.bin
clBuildProgram successfully compiled cached binary: cache/solverSetup2.cl.GeForce GTX 560 Ti.319.32.bin
clBuildProgram successfully compiled cached binary: cache/solverSetup.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel BatchSolveKernelFriction ready. 
compiling kernel BatchSolveKernelContact ready. 
compiling kernel ContactToConstraintKernel ready. 
compiling kernel SetSortDataKernel ready. 
compiling kernel SetDeterminismSortDataBodyA ready. 
compiling kernel SetDeterminismSortDataBodyB ready. 
compiling kernel SetDeterminismSortDataChildShapeA ready. 
compiling kernel SetDeterminismSortDataChildShapeB ready. 
compiling kernel ReorderContactKernel ready. 
compiling kernel CopyConstraintKernel ready. 
clBuildProgram successfully compiled cached binary: cache/batchingKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel CreateBatches ready. 
clBuildProgram successfully compiled cached binary: cache/batchingKernelsNew.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel CreateBatchesNew ready. 
clBuildProgram successfully compiled cached binary: cache/rayCastKernels.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel rayCastKernel ready. 
clBuildProgram successfully compiled cached binary: cache/integrateKernel.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel integrateTransformsKernel ready. 
clBuildProgram successfully compiled cached binary: cache/updateAabbsKernel.cl.GeForce GTX 560 Ti.319.32.bin
compiling kernel initializeGpuAabbsFull ready. 
-----------------------------------------------------
Demo settings:
  SelectedDemo=0, demoname = BoxTrimesh
  x_dim=30, y_dim=30, z_dim=30
  x_gap=16.299999, y_gap=6.300000, z_gap=16.299999

OpenCL settings:
  Preferred cl_device index -1
  Preferred cl_platform index-1

Platform info:
  CL_PLATFORM_VENDOR:           NVIDIA Corporation
  CL_PLATFORM_NAME:             NVIDIA CUDA
  CL_PLATFORM_VERSION:          OpenCL 1.1 CUDA 4.2.1

Device Info:
  CL_DEVICE_NAME:           GeForce GTX 560 Ti
  CL_DEVICE_VENDOR:             NVIDIA Corporation
  CL_DRIVER_VERSION:            319.32
  CL_DEVICE_TYPE:           CL_DEVICE_TYPE_GPU
  CL_DEVICE_MAX_COMPUTE_UNITS:      8
  CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:   3
  CL_DEVICE_MAX_WORK_ITEM_SIZES:    1024 / 1024 / 64 
  CL_DEVICE_MAX_WORK_GROUP_SIZE:    1024
  CL_DEVICE_MAX_CLOCK_FREQUENCY:    1800 MHz
  CL_DEVICE_ADDRESS_BITS:       32
  CL_DEVICE_MAX_MEM_ALLOC_SIZE:     255 MByte
  CL_DEVICE_GLOBAL_MEM_SIZE:        1023 MByte
  CL_DEVICE_ERROR_CORRECTION_SUPPORT:   no
  CL_DEVICE_LOCAL_MEM_TYPE:     local
  CL_DEVICE_LOCAL_MEM_SIZE:     48 KByte
  CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE:   64 KByte
  CL_DEVICE_QUEUE_PROPERTIES:       CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
  CL_DEVICE_QUEUE_PROPERTIES:       CL_QUEUE_PROFILING_ENABLE
  CL_DEVICE_IMAGE_SUPPORT:      1
  CL_DEVICE_MAX_READ_IMAGE_ARGS:    128
  CL_DEVICE_MAX_WRITE_IMAGE_ARGS:   8

  CL_DEVICE_IMAGE <dim>         2D_MAX_WIDTH     32768
                    2D_MAX_HEIGHT    32768
                    3D_MAX_WIDTH     2048
                    3D_MAX_HEIGHT    2048
                    3D_MAX_DEPTH     2048

  CL_DEVICE_EXTENSIONS:cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll  cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 
  CL_DEVICE_PREFERRED_VECTOR_WIDTH_<t>  CHAR 1, SHORT 1, INT 1,LONG 1, FLOAT 1, DOUBLE 1




Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000000004369fd in ?? ()
#2  0x0000000000435029 in ?? ()
#3  0x000000000043507a in ?? ()
#4  0x00000000004061d0 in ?? ()
#5  0x00007ffff697e76d in __libc_start_main (main=0x405620, argc=1, ubp_av=0x7fffffffe638, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe628)
    at libc-start.c:226
#6  0x00000000004089d9 in ?? ()
#7  0x00007fffffffe628 in ?? ()
#8  0x000000000000001c in ?? ()
#9  0x0000000000000001 in ?? ()
#10 0x00007fffffffe90c in ?? ()
#11 0x0000000000000000 in ?? ()

crash on MacOSX 10.8.5

Hello,

The program launches, but crashes almost immediately (a window with a cube made of cubes appears, no interaction, crash).

I made it with premake4_osx, make config=debug32.
Other test programs seem to work (e.g. ImplicitCloth, simpleOpenGL3, Test_* except 'initialize' which fails at allocating 925 Mb)

Cheers,

Stéphane

here is the bt:
Reading symbols for shared libraries . done

Program received signal SIGABRT, Aborted.
0x9188ea6a in __pthread_kill ()
(gdb) bt
#0 0x9188ea6a in __pthread_kill ()
#1 0x9a340b2f in pthread_kill ()
#2 0x9a377631 in abort ()
#3 0x00747318 in gpusKillClient ()
#4 0x00747d16 in gpusQueueSubmitDataBuffers ()
#5 0x05e32a20 in gldClearFramebufferData ()
#6 0x05e328d0 in gldClearFramebufferData ()
#7 0x05e32cba in gldFinishQueue ()
#8 0x984ff391 in dyld_stub__CSCheckFix ()
#9 0x9851af23 in clFlush ()
#10 0x943ccc82 in _dispatch_client_callout ()
#11 0x943d1d2f in _dispatch_barrier_sync_f_slow ()
#12 0x943ce3fb in dispatch_barrier_sync_f ()
#13 0x9851b009 in clFinish ()
#14 0x001fbdb0 in b3GpuPgsContactSolver::solveContacts (this=0x1341a10, numBodies=1001, bodyBuf=0x133c720, inertiaBuf=0x133c340, numContacts=18523, contactBuf=0x133c0c0, config=@0x122bdb0, static0Index=0) at ../../src/Bullet3OpenCL/RigidBody/b3GpuPgsContactSolver.cpp:1042
#15 0x00207d27 in b3GpuRigidBodyPipeline::stepSimulation (this=0x122bd10, deltaTime=0.0166666675) at ../../src/Bullet3OpenCL/RigidBody/b3GpuRigidBodyPipeline.cpp:419
#16 0x0004883d in GpuRigidBodyDemo::clientMoveAndDisplay (this=0x1225f10) at ../../Demos3/GpuDemos/rigidbody/GpuRigidBodyDemo.cpp:225
#17 0x00013859 in main (argc=1, argv=0xbffff8d8) at ../../Demos3/GpuDemos/main_opengl3core.cpp:988

the init part:

Demo settings:
SelectedDemo=1, demoname = BoxBox
x_dim=10, y_dim=10, z_dim=10
x_gap=16.299999, y_gap=6.300000, z_gap=16.299999

OpenCL settings:
Preferred cl_device index -1
Preferred cl_platform index-1

Platform info:
CL_PLATFORM_VENDOR: Apple
CL_PLATFORM_NAME: Apple
CL_PLATFORM_VERSION: OpenCL 1.2 (Apr 25 2013 18:32:03)

Device Info:
CL_DEVICE_NAME: ATI Radeon HD 6750M
CL_DEVICE_VENDOR: AMD
CL_DRIVER_VERSION: 1.0
CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU
CL_DEVICE_MAX_COMPUTE_UNITS: 6
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
CL_DEVICE_MAX_WORK_ITEM_SIZES: 1024 / 1024 / 1024
CL_DEVICE_MAX_WORK_GROUP_SIZE: 1024
CL_DEVICE_MAX_CLOCK_FREQUENCY: 600 MHz
CL_DEVICE_ADDRESS_BITS: 32
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 256 MByte
CL_DEVICE_GLOBAL_MEM_SIZE: 1024 MByte
CL_DEVICE_ERROR_CORRECTION_SUPPORT: no
CL_DEVICE_LOCAL_MEM_TYPE: local
CL_DEVICE_LOCAL_MEM_SIZE: 32 KByte
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64 KByte
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_PROFILING_ENABLE
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8

CL_DEVICE_IMAGE 2D_MAX_WIDTH 8192
2D_MAX_HEIGHT 8192
3D_MAX_WIDTH 2048
3D_MAX_HEIGHT 2048
3D_MAX_DEPTH 2048

CL_DEVICE_EXTENSIONS:cl_APPLE_SetMemObjectDestructor cl_APPLE_ContextLoggingFunctions cl_APPLE_clut cl_APPLE_query_kernel_names cl_APPLE_gl_sharing cl_khr_gl_event cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store
CL_DEVICE_PREFERRED_VECTOR_WIDTH_ CHAR 16, SHORT 8, INT 4,LONG 2, FLOAT 4, DOUBLE 0

the compile part is too long for this issue ticket...

Memory usage

Hi, everyone!

I have a question about launching several bullet3 demo applications such as App_BasicGpuDemo at the same time. If I launched a demo application and closed it repeatedly, everything is fine, but the computer is crashed when I launched 3 or more demo applications and didn't close any demo application. That is, when launched, the 3rd application leaded to the computer's crash. I think that the memory on the GPU has exhausted, and found that the memory usage is allocated by the b3Config class.

                                                                            
  b3Config()                                                                        
    :m_maxConvexBodies(128*1024),                                                   
    m_maxVerticesPerFace(64),                                                       
    m_maxFacesPerShape(12),                                                         
    m_maxConvexVertices(8192),                                                      
    m_maxConvexIndices(81920),                                                      
    m_maxConvexUniqueEdges(8192),                                                   
    m_maxCompoundChildShapes(8192),                                                 
    m_maxTriConvexPairCapacity(256*1024)                                            
  {                                                                                 
    m_maxConvexShapes = m_maxConvexBodies;                                          
    m_maxBroadphasePairs = 8*m_maxConvexBodies;                                     
    m_maxContactCapacity = m_maxBroadphasePairs;                                    
  }                                       

If there are 100 boxes or spheres in the demo application, how much memory should I allocate? The original setting is too large to utilize memory efficiently.

The Platform info:
CL_PLATFORM_VENDOR: Advanced Micro Devices, Inc.
CL_PLATFORM_NAME: AMD Accelerated Parallel Processing
CL_PLATFORM_VERSION: OpenCL 1.2 AMD-APP (1113.2)
Device Info:
CL_DEVICE_NAME: Pitcairn
CL_DEVICE_VENDOR: Advanced Micro Devices, Inc.
CL_DRIVER_VERSION: 1113.2 (VM)
CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU
CL_DEVICE_MAX_COMPUTE_UNITS: 16
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS: 3
CL_DEVICE_MAX_WORK_ITEM_SIZES: 256 / 256 / 256
CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
CL_DEVICE_MAX_CLOCK_FREQUENCY: 870 MHz
CL_DEVICE_ADDRESS_BITS: 32
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 512 MByte
CL_DEVICE_GLOBAL_MEM_SIZE: 1792 MByte
CL_DEVICE_ERROR_CORRECTION_SUPPORT: no
CL_DEVICE_LOCAL_MEM_TYPE: local
CL_DEVICE_LOCAL_MEM_SIZE: 32 KByte
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 64 KByte
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_PROFILING_ENABLE
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_MAX_READ_IMAGE_ARGS: 128
CL_DEVICE_MAX_WRITE_IMAGE_ARGS: 8

CL_DEVICE_IMAGE 2D_MAX_WIDTH 16384
2D_MAX_HEIGHT 16384
3D_MAX_WIDTH 2048
3D_MAX_HEIGHT 2048
3D_MAX_DEPTH 2048

Thanks

Compilation errors when using clang 3.4

Trying to compile bullet3 with clang 3.4 results in errors like that (in few files using b3QuadWord):

In file included from ../../src/Bullet3Dynamics/b3CpuRigidBodyPipeline.cpp:3:
../../src/Bullet3Dynamics/shared/b3IntegrateTransforms.h:43:9: error: 'x' is a protected member of 'b3QuadWord'
                        dorn.x = axis.x;
                             ^
../../src/Bullet3Common/b3QuadWord.h:74:20: note: declared protected here
                struct {b3Scalar x,y,z,w;};
                                 ^

Running Ubuntu 13.10 64-bit, used "./premake4_linux64 gmake" prior to launching make.

Tested on commit ac32af2.

Problem with Terrain collisions (was googlecode Issue 772)

What steps will reproduce the problem?

  1. Run the TerrainDemo and throw some boxes around

What is the expected output? What do you see instead?
Boxes go through the terrain

What version of the product are you using? On what operating system?
using the latest (r2716) on Windows 8.1

Please provide any additional information below.
Ok, After spending hours trying to figure out why the terrain doesn't work in my engine i decided to try and reproduce it in the TerrainDemo.
It turns out all i had to do was run the Terrain Demo and throw some boxes around and i got the exact same behavior.

Not only the boxes are unstable (and jump around on the terrain until the go to sleep) the BIG problem is that at some part of the terrain they just go right through it.

https://code.google.com/p/bullet/issues/detail?id=772&colspec=Modified%20ID%20Type%20Stars%20Status%20Owner%20Summary
See discussion there too.

After further investigation i found out that the problem happens on some triangles in the terrain and from the debug draw i could see that as the box was hitting the triangle the contact point where generated , but instead of pointing away from the terrain they pointed inside the terrain and just pushed the box through it.

IMPORTANT : I also found out that SPHERES do not have the same problem. Sphere behave beautifully and they are much much more stable than the boxes, which means the problem is probably in the box-concave collision algorithm.

here is a little video i took of the Terrain Demo to show all this :
http://youtu.be/zCJwxk089iM

Thanks :)

Improve collision performance for convex shapes with many edges (edge-edge case is slow)

Currently the GPU SAT clipping implementation for convex-convex collision detection only works fast between convexes with few edges, such as boxes and tetrahedra. Many edge-edge tests slows down the simulation a lot.
We could add a GJK/EPA style collision detection, with persistent contact caches.
Another thing to try it to use the Gauss map optimization, reducing the number of edge-edge cases.

Another idea is to use an LCP solver for the convex collision detection, see the Lemke solver in GPU Gems 3, chapter 33 for example: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch33.html

Support GPU ray cast

GPU accelerated ray casting should be added.

It can be used for picking, line-of-sight queries and graphics related queries (shadow generation, ray tracer etc). There is a basic demo as a starting point. It supports GPU ray cast against spheres. It needs to be extended to support all collision shapes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.