Commit Graph
915 Commits
Author SHA1 Message Date
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
Erwin Coumans 552cb5852a PyBullet: add signed distance field support, with example/signedDistanceField.py
See also data\toys\concave_box.urdf and data\toys\concave_box.cdf

data\toys\concave_box.cdf was generated from concave_box.obj using
//GenerateSDF.exe -r "32 32 32" -d "-1.6 -1.6 -.6 1.6 1.6 .6" concave_box.obj
//SDF is based on code from DiscreGrid, https://github.com/InteractiveComputerGraphics/Discregrid
2018-04-16 22:57:43 +02:00
Erwin Coumans 11008d8110 fixes, backwards compatibility 2018-04-12 09:28:30 -07:00
Erwin Coumans f37e22bfba fix syntax error 2018-04-10 15:29:31 -07:00
erwincoumans 759d8b5317 nullptr -> 0 (no C++11) 2018-04-09 21:28:29 -07:00
erwincoumans 103f16c64a UINT_MAX requires #include <limits.h> 2018-04-09 20:59:16 -07:00
erwincoumans 5747b1a689 fix case sensitive header include 2018-04-09 20:57:36 -07:00
erwincoumans 7949f31c3e fixes in btMiniSDF 2018-04-08 21:30:06 -07:00
erwincoumans 9ab03057ea add btMiniSDF and btSdfCollisionShape to CMakeLists.txt 2018-04-08 21:25:38 -07:00
erwincoumans 698836d54e Preparation to add signed distance field collision detection.
btMiniSDF is based on https://github.com/InteractiveComputerGraphics/Discregrid
2018-04-08 21:10:03 -07:00
Daniele Bartolini e4e82b05b9 Fix warning with -Wmisleading-indentation 2018-03-14 23:19:23 +01:00
Erwin Coumans b578361acf Use kF_UseGjkConvexCastRaytest by default for raycast in PyBullet (it is more robust/accurate, but a bit slower)
Use 10*EPSILON, as suggested in Gino's paper:
http://www.continuousphysics.com/ftp/pub/test/files/physics/papers/jgt04raycast.pdf
2018-03-07 14:51:51 -08:00
Stephen Sinclair 58310bd21d Fix calculation of startPt for perturbed object A.
Fixes #1563.
2018-02-16 11:57:16 -03:00
Erwin Coumans 508550c5e9 fix premake build for linux, thanks to @consultit
See also issue #1538
2018-02-09 18:46:26 -08:00
CuriousRubick c41d575907 early break if single object sleeping 2018-01-26 10:29:46 -06:00
Alexis Breust d3f7a68541 Removed warning in btCapsuleShape header 2018-01-25 16:41:25 +01:00
Erwin Coumans c7314dad31 fix bug, causing bus-error in ExampleBrowser 2018-01-24 05:50:44 -08:00
Erwin Coumans 79051b7611 allow to use colors from MJCF file as option (default to random Google colors), use p.loadMJCF(filename, flags=p.URDF_MJCF_COLORS_FROM_FILE
fix quadruped.py example.
add PyBullet.isConnected() API, more friendly than PyBullet.getConnectionInfo()["connected"]
2018-01-11 21:04:08 -08:00
erwincoumans e138e85bca allow to enable/disable implicit cylinder conversion through an API
p.loadURDF("r2d2.urdf", flags=p.URDF_USE_IMPLICIT_CYLINDER)
allow to enable/disable deterministicOverlappingPairs through an API
p.setPhysicsEngineParameter(deterministicOverlappingPairs = False)
2018-01-09 10:10:36 -08:00
Erwin Coumans e97b751781 further work on urdfEditor.py, fix some serialization issues 2018-01-08 12:25:56 -08:00
Erwin Coumans 4c6df650d4 skip serialization of empty contact manifolds. 2017-12-31 11:28:22 -08:00
Erwin Coumans f104765c47 added some template to restore (syncMultiBody, syncContactManifolds) for single float and double precision, in 'pybullet.restoreState' 2017-12-31 11:19:29 -08:00
Erwin Coumans 20e00d11d8 further work on saveRestoreState.py 2017-12-30 21:57:42 -08:00
Erwin Coumans 0326fa93a8 made some progress in saving and restoring the state during the simulation, with identical results.
Option to de/serialize btPersistentContactManifolds and fix lossy conversion during btMultiBody de/serialization of base world transform
(serialize the quaternion, not the converted 3x3 matrix)
There are still several caches not taken into account, and btMultiBody links/constraints are not deserialized yet etc.
See examples\pybullet\examples\saveRestoreState.py for an example.
2017-12-30 14:19:13 -08:00
Joey Liaw bbc536d887 add const to masses for calculatePrincipalAxisTransform 2017-11-25 13:33:26 -08:00
erwincoumans 29aa9cb789 Bullet bump up to version 2.88
add preliminary support to import btMultiBody from a .bullet file (will help save/restore state)
fix some Windows char/widechar issues
2017-11-22 18:12:02 -08:00
erwincoumans d45cc49a90 Merge pull request #1421 from elect86/master
Update btTriangleIndexVertexArray.h
2017-11-09 12:09:33 -08:00
Erwin Coumans 344005a8f0 catch invalid mass/inertia instead of division by zero/nan. also, avoid indexing <0 2017-11-07 19:25:14 -08:00
Giuseppe Barbieri 16ed6ec10b Update btTriangleIndexVertexArray.h 2017-11-04 12:06:45 +01:00
Giuseppe Barbieri 9d50a167b0 Update btContinuousConvexCollision.cpp 2017-11-01 23:29:50 +01:00
Giuseppe Barbieri 5436336a38 Update btStaticPlaneShape.cpp 2017-11-01 22:53:39 +01:00
Giuseppe Barbieri 5e017a1e4d Update btContinuousConvexCollision.h 2017-11-01 22:32:48 +01:00
d3x0r 88b49947b5 Composite of fixed code for mingw64(on windows) and general fixes for msvc.
1) (win32window) don't convert char to wide, use char direct to window.
2) (CMakeLists) Don't link one library as static CPPLIB and no others (mismatched allocations)
3) (macros) Fix Gwen macros for mingw64 on windows build.  (changes are by compiler(msc_ver) not platform)
4) (FileUtils) sprintf_s reference by platform, not compiler (mingw64 support)
5) (b3OpenCLUtils) fix bad define name _MSVC_VER->_MSC_VER
6) (compoundCollision) remove unused variables, simplify operation.
7) (impulseconstraint) remove duplicated code block
2017-10-28 14:42:38 -07:00
erwincoumans d05ad4b821 Merge pull request #1394 from davilovick/master
Optimize rayTest with btScaledBvhTriangleMeshShape
2017-10-24 00:33:07 +00:00
David Ávila 88758e44cb Add comments to btCollisionWorld 2017-10-23 08:50:24 +02:00
David Ávila Membrives 2cc9ff2176 Optimize rayTest with btScaledBvhTriangleMeshShape 2017-10-19 22:55:18 +02:00