Commit Graph

950 Commits

Author SHA1 Message Date
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
AndreaCatania
45558fc25a Implemented callbacks to customize combining algorithm of Friction, Restitution, etc.. 2017-10-15 11:42:02 +02:00
Giuseppe Barbieri
b31f372e3b Typo 2017-10-07 13:47:34 +02:00
erwincoumans
f88973f832 Merge pull request #1286 from mendsley/clean_vbt_allocations
Optimize Dbvt trees in place
2017-09-24 20:35:57 -07:00
erwincoumans
6f51d81cbb Revert "Export targets in CMake and add include directories to target properties" 2017-09-10 21:20:54 -07:00
Markus Rickert
fbffb246fe Export targets in CMake and add include directories to target properties 2017-09-10 23:43:50 +02:00
erwincoumans
eb97e06280 fix minitaur.urdf: move lower-leg inertia to center, add missing collision for one of the motors, add contact parameters for friction_anchor, spinning friction, compliance (stiffness/damping)
fix in indexing for maximal coordinates (unused by default, still experimental, requires many iterations for Minitaur due to extreme mass-ratio, hence use of reduces/generalized coordinates)
modify quadruped.py to test maximal coordinates
wrap angular servo (positional) target within [-PI,PI] in btGeneric6DofSpring2Constraint
add 'j' key to show body frames in wireframe/debug mode
2017-09-02 01:05:42 -07:00
Matthew Endsley
4c00b674b3 Optimize Dbvt trees in place
Instead of allocating new vectors for each partition, simply partion the
nodes in place and pass the corresponding ranges to the next phase.
2017-08-30 10:27:38 -07:00
Wugand
b7011a864b Fix for memory leak at btCreateCompoundFromGimpactShape
This is an fix for issue #1213
2017-07-03 11:08:36 +02:00
Erwin Coumans
4a7469a1ba fix uninitialized-variable issues (were unused initialized, but triggers some memory checking tools) 2017-06-09 21:19:02 -07:00
yunfeibai
708a430e30 comment out btThreadsAreRunning which does not build. 2017-06-02 18:32:39 -07:00
Lunkhound
dfe184e8d3 Bullet 2 threading refactor: moved parallel-for calls into core libs 2017-05-23 01:01:20 -07:00
Erwin Coumans
433d11d8cf Add a btIDEbugDraw::clearLines, helps multi-threaded rendering of lines (while updating those lines in a dynamics world in a different thread)
Expose COV_ENABLE_VR_RENDER_CONTROLLERS, to enable/disable rendering of controllers (and some frames) in VR
Expose COV_ENABLE_RENDERING to enable/disable rendering.
Fix some multi-threading issues (potential crashes), related to debug drawing/rendering in one thread, while changing the dynamics world/removing/resetSimulation in a different thread.
2017-05-16 12:19:03 -07:00
Erwin Coumans
fc6fb7b14c initialize values (padding etc) help asan/msan tests 2017-05-09 18:00:28 -07:00
Erwin Coumans
0d3940b8bd fix signed-integer-overflow issue:
Hash functions rely on 2's complement behaviour. Use unsigned integers to get that.
2017-05-09 16:36:11 -07:00
Gregery Barton
03742208f1 Collider object not necessary
Collider object not necessary without DBVT_BP_ACCURATESLEEPING defined
2017-05-04 05:22:00 +10:00