Commit Graph

950 Commits

Author SHA1 Message Date
erwincoumans
1061b3d816 Update btMprPenetration.h
fix typo
2019-06-17 09:39:25 -07:00
Rémi Verschelde
d85b800702 Convert DOS (CRLF) source files to Unix (LF) line endings
Excluded `examples/pybullet/gym/pybullet_data/` which has many (3000+)
CRLF data files (obj, mtl, urdf), and `docs/pybullet_quickstart_guide`
which has generated .js and .htm files with CRLF line endings too.
2019-05-22 10:01:32 +02:00
Chuyuan Fu
64ebe27477 Add safety check 2019-05-16 18:13:29 -07:00
erwincoumans
a8d1c121fd allow Z as up-axis for raycast acceleration in btHeightfieldTerrainShape 2019-04-16 10:34:59 -07:00
erwincoumans
f28fd91e4f add raycast accelerator for btHeightfieldTerrainShape, thanks to Marc Zylann, see https://github.com/bulletphysics/bullet3/pull/2062
it can be disabled by setting the flag cb.m_flags |= btTriangleRaycastCallback::kF_DisableHeightfieldAccelerator;
acceleration is disabled for z axis up.
add btHeightfieldTerrainShape example to example browser
2019-04-15 21:55:29 -07:00
Stephen Gold
231195843f in btSimpleBroadphase::destroyProxy(), remove pairs before freeing proxy 2019-04-02 21:51:58 -07:00
Francois Beaune
649a7d0981 Fix crash in btGImpactMeshShape vs btBvhTriangleMeshShape 2019-02-27 10:41:54 +01:00
Erwin Coumans
77a9a77b60 create some 'Unity Build' cpp files, to work-around setuptools on Windows creating >32k command-line
see 'won't fix' in https://bugs.python.org/issue1539295
2019-01-24 10:32:15 -08:00
erwincoumans
e637b24237 remove Rand.* and <random> (no C++11) 2019-01-23 17:35:45 -08:00
erwincoumans
93087f36df avoid conflicts when using a unity build (single cpp file including many other cpp) 2019-01-23 13:35:58 -08:00
erwincoumans
ae8e83988b Add preliminary PhysX 4.0 backend for PyBullet
Add inverse dynamics / mass matrix code from DeepMimic, thanks to Xue Bin (Jason) Peng
Add example how to use stable PD control for humanoid with spherical joints (see humanoidMotionCapture.py)
Fix related to TinyRenderer object transforms not updating when using collision filtering
2019-01-22 21:08:37 -08:00
Erwin Coumans
80684f44ea fix issue 76 (should be harmless) 2019-01-04 10:10:20 -08:00
Erwin Coumans
01bb0c3bd7 avoid macro redefinition 2019-01-04 08:40:54 -08:00
Erwin Coumans
83213da154 applied patch for Issue 68
// Ensure that gContactProcessedCallback is called for concave shapes.
        if (getLastManifold())
            m_resultOut->refreshContactPoints();
2018-12-22 17:06:57 -08:00
Erwin Coumans
e5fb1aa1d5 apply improvement, to allow btCompoundShape per-shape collision filtering
Fixes old issue 67
2018-12-22 17:02:58 -08:00
Erwin Coumans
7740162ad8 apply gimpact versus rotated plane issue,thanks to @cameronwhite
see bd8bd11929
Fixes Issue 69
2018-12-22 16:38:40 -08:00
erwincoumans
d477d18ad6 Expose subsimplexcast max iterations/epsilon
Note that for best quality, always use BT_USE_DOUBLE_PRECISION
This fixes Issue 34
https://github.com/bulletphysics/bullet3/issues/34
2018-12-22 12:44:29 -08:00
erwincoumans
7ce9ad23fb Use safeNormalize, in case a both objects have identical origin.
Fixes Issue 2021
2018-12-22 10:59:00 -08:00
Erwin Coumans
74223ced56 disable per-thread tsan issue, todo: checkout why it fails 2018-12-04 20:00:05 +01:00
erwincoumans
49c8e738a4 propagate resultOut->m_closestPointDistanceThreshold properly for convex-convex (capsule, sphere) and convex vs plane 2018-11-27 17:31:18 -08:00
erwincoumans
642c6a71d2 fix 2 potential data race conditions. 2018-11-08 14:41:22 -08:00
Erwin Coumans
131535a99f remove debug stats 2018-10-31 21:24:44 -07:00
erwincoumans
5fbc015ba6 Merge pull request #1951 from duckdoom5/patch-1
Added missing extern declaration
2018-10-29 17:00:35 -07:00
Michał Janiszewski
5b90e7e0b7 Update include guard in btGImpactBvh.h 2018-10-28 21:50:28 +01:00
Jelle
f9ff09a6b5 Added extern declaration
The extern declaration  was missing from this file.
2018-10-24 17:20:25 +02:00
Erwin Coumans
42ae4e81a8 apply clang-format (on Mac, slightly different than running it on Windows) 2018-09-30 11:43:57 -07:00
erwincoumans
5bcd43711a PyBullet OpenGL/EGL hardware getCameraImage: use glViewport to reduce the glReadPixels calling cost dramatically for small images
PyBullet Allow OpenGL/EGL hardware to render segmentation mask. Use pybullet.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX or pybullet.ER_SEGMENTATION_MASK
PyBullet.removeBody fix indexing bug (use foundIndex, not i)
PyBullet bump up version to 2.2.3
2018-09-30 07:10:40 -07:00
erwincoumans
ab8f16961e Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
2018-09-23 14:17:31 -07:00
erwincoumans
9553892770 PyBullet / BulletRobotics:
Implement collisionFilterPlugin, use setCollisionFilterPair to enable or disable collision detection between specific pairs of objects.
Also, expose setCollisionFilterGroupMask as PyBullet API and in urdf using the tag <collision group="1" mask="2"/>.
See examples/pybullet/examples/collisionFilter.py for an example.
PyBullet default: Lower the warmstarting factor, for maximal coordinates rigid bodies for more stable simulation.
Add btCollisionWorld::refreshBroadphaseProxy to easier recreate the broadphase proxy without adding/removing objects to the world.
2018-09-12 19:30:49 -07:00
Erwin Coumans
9a26d4aaaf fix type 2018-08-31 09:59:18 -07:00
Erwin Coumans
f1cb4fe29c fix crash in btInternalEdgeUtility when a mesh is not the expected type
(don't wrap a mesh in a btCompoundShape if you want to use the edge utility)
2018-08-31 09:25:49 -07:00
erwincoumans
ee9fca8c29 GJK fix for https://github.com/bulletphysics/bullet3/issues/1703
In a nutshell, we added a more reliable check, based on if the origin is in the GJK simplex, to determine if we are really intersecting and need to run EPA.
See also "Real-time Collision Detection with Implicit Objects" by Leif Olvang
Todo: integrate the simplex penetration check directly inside the Bullet btVoronoiSimplexSolver
and remove this temporary code from libCCD
Note, for large differences in shapes, use double precision build!
2018-08-30 18:35:51 -07:00
Erwin Coumans
ff43cea263 Fix some deactivation issues with btMultiBodyDynamicsWorld, should also improve performance for PyBullet with larger worlds
(even when sleeping is disabled, islands are split)
2018-08-26 16:14:36 -07:00
Erwin Coumans
d7c68dd822 fix leak 2018-07-27 10:13:09 +02:00
Erwin Coumans
a696bd6a46 fix memory leak reported in Issue #1800
avoid access to array elements outside of range
2018-07-25 19:59:29 +02:00
Jeffrey Bingham
f2afb4af35 remove some debug globals from third_party/bullet
There are some debug global variables that prevent using bullet safely on multi-threaded environments (tsan failures).

PATCH from marioprats@
2018-06-23 22:01:41 -07:00
erwincoumans
5f203df65a Update btConvexConvexAlgorithm.cpp 2018-06-13 07:47:14 -07:00
erwincoumans
6376197e5e Merge pull request #1749 from erwincoumans/master
remove getLinkState from API, it automatically calculated forwardKine…
2018-06-13 03:38:36 +00:00
Erwin Coumans
e24da97140 revert GJK change yet again, some degenerate case / regression 2018-06-12 19:52:38 -07:00
erwincoumans
437d66f9b4 Update btOverlappingPairCache.h
processAllOverlappingPairs : don't call own method, call the default one without dispatchInfo. Thanks James Dolan, fixes Issue #1750
2018-06-12 19:04:31 -07:00
erwincoumans
97c6937388 Simplify GJK. Still needs double precision for large differences of feature scales.
Extract faces directly from btConvexHullComputer (in initializePolyhedralFeatures), instead of reconstructing them, thanks to Josh Klint in #1654
PyBullet: use initializePolyhedralFeatures for convex hulls and boxes (to allow SAT)
PyBullet: expose setPhysicsEngineParameter(enableSAT=0 or 1) to enable Separating Axis Test based collision detection for convex vs convex/box and convex versus concave triangles (in a triangle mesh).
2018-06-12 16:08:46 -07:00
erwincoumans
62485abafe PyBullet: disable deterministic pairs by default
PyBullet: Only set static when sleeping is enables (todo: figure out issue with determinism)
2018-06-11 17:32:44 -07:00
Erwin Coumans
ad0c7ecaa2 different way of sorting pairs (using indexing), don't 'clear' all pairs. 2018-06-11 14:42:26 -07:00
erwincoumans
0cec85626f enable more unit tests in PyBullet.
return Py_None if no user data found, to pass the test.
enable m_deterministicOverlappingPairs by default.
if m_deterministicOverlappingPairs, sort the collision pairs.
2018-06-09 12:19:29 -07:00
erwincoumans
a450600eb8 revert gjk test 2018-06-01 22:17:46 -07:00
erwincoumans
11d8f069f0 Disable overlapping pair debug variables behind the BT_DEBUG_COLLISION_PAIRS preprocessor definition. 2018-05-29 17:06:35 -07:00
Erwin Coumans
e79ae13cde disable adhoc gjk terminarion heuristics by default 2018-05-26 08:52:52 +10:00
Erwin Coumans
d133c33d73 Use a very large default m_contactStiffness (so that if one object is a bit soft, the stiffness is properly combined) 2018-05-26 08:50:45 +10:00
Erwin Coumans
a9ff5246c9 make gjk a bit more robust, try different initial guess vector if it fails to find a solution (happens for queries with large differences in shape size) 2018-05-25 08:18:12 +10:00
Erwin Coumans
62d58259bc Fix Issue #1623, SphereTriangleDetector for cases with positive contactBreakingThreshold and where sphere was intersecting with multiple edges
(need to take the closest edge)

Thanks to Andrea Catania for the report and reproduction case!
2018-05-22 08:36:00 +10:00