Commit Graph

2342 Commits

Author SHA1 Message Date
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
Ju-Hyung Lee
00affd62ac Fix to support different kind of wheel axis 2018-04-04 12:31:52 +09:00
Erwin Coumans
6856334d48 fixes: make argument names in header and cpp the same 2018-03-27 16:54:41 -07:00
erwincoumans
fafa939d33 Merge pull request #1579 from lunkhound/parallel-solver-wip3
Multithreaded constraint solver
2018-03-26 17:11:05 -07:00
Lunkhound
bdc3c2bafb task scheduler: add multiple job queues to improve performance when there are many threads 2018-03-17 22:59:29 -07:00
Lunkhound
04e0d57dc1 add premake option 'enable-multithreading' 2018-03-16 23:42:43 -07:00
Daniele Bartolini
e4e82b05b9 Fix warning with -Wmisleading-indentation 2018-03-14 23:19:23 +01:00
Lunkhound
e526e48df8 parallel solver: slightly overallocate to reduce how often allocation is needed 2018-03-13 04:19:02 -07: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
Lunkhound
eec478709a parallel solver: small tweaks and fixes 2018-03-06 02:43:59 -08:00
Lunkhound
45fd4acf6e dynamicsWorldMt: make island mgr aware of whether a parallel solver is present and make handoff from parallel solver to solver-pool more explicit 2018-03-05 20:05:38 -08:00
a
86ca7dc2d1 Fix for #1567 2018-03-05 23:25:25 +01:00
a
2348c6ba0a Fix for #1582 2018-03-05 23:05:22 +01:00
Lunkhound
06690e542b fix compile error for GCC 2018-02-27 00:30:45 -08:00
Lunkhound
b8720f2161 parallel solver: various changes
- threading: adding btSequentialImpulseConstraintSolverMt
 - task scheduler: added parallelSum so that parallel solver can compute residuals
 - CommonRigidBodyMTBase: add slider for solver least squares residual and allow multithreading without needing OpenMP, TBB, or PPL
 - taskScheduler: don't wait for workers to sleep/signal at the end of each parallel block
 - parallel solver: convertContacts split into an allocContactConstraints and setupContactConstraints stage, the latter of which is done in parallel
 - parallel solver: rolling friction is now interleaved along with normal friction
 - parallel solver: batchified split impulse solving + some cleanup
 - parallel solver: sorting batches from largest to smallest
 - parallel solver: added parallel batch creation
 - parallel solver: added warmstartingWriteBackContacts func + other cleanup
 - task scheduler: truncate low bits to preserve determinism with parallelSum
 - parallel solver: reducing dynamic mem allocs and trying to parallelize more of the batch setup
 - parallel solver: parallelize updating constraint batch ids for merging
 - parallel solver: adding debug visualization
 - task scheduler: make TBB task scheduler parallelSum deterministic
 - parallel solver: split batch gen code into separate file; allow selection of batch gen method
 - task scheduler: add sleepWorkerThreadsHint() at end of simulation
 - parallel solver: added grain size per phase
 - task Scheduler: fix for strange threading issue; also no need for main thread to wait for workers to sleep
 - base constraint solver: break out joint setup into separate function for profiling/overriding
 - parallel solver: allow different batching method for contacts vs joints
 - base constraint solver: add convertJoint and convertBodies to make it possible to parallelize joint and body conversion
 - parallel solver: convert joints and bodies in parallel now
 - parallel solver: speed up batch creation with run-length encoding
 - parallel solver: batch gen: run-length expansion in parallel; collect constraint info in parallel
 - parallel solver: adding spatial grid batching method
 - parallel solver: enhancements to spatial grid batching
 - sequential solver: moving code for writing back into functions that derived classes can call
 - parallel solver: do write back of bodies and joints in parallel
 - parallel solver: removed all batching methods except for spatial grid (others were ineffective)
 - parallel solver: added 2D or 3D grid batching options; and a bit of cleanup
 - move btDefaultTaskScheduler into LinearMath project
2018-02-26 22:47:33 -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
ecfdd07f19 early break if single object sleeping 2018-01-26 10:31:00 -06: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
Alexis Breust
c1b5024aea Removed warnings of unused variable in btThreads header 2018-01-25 16:37:30 +01:00
Erwin Coumans
c7314dad31 fix bug, causing bus-error in ExampleBrowser 2018-01-24 05:50:44 -08:00
Erwin Coumans
c6a350b807 BulletInverseDynaimcs: re-applied fix
PyBullet: increase humanoid training from 30 to 300M (need to figure out the right hyperparameters...)
2018-01-16 21:54:46 -08:00
erwincoumans
9ffb05eb3b fix double->float issue by cast, fixes issue #1510
fix possible out-of-bounds access in btMultiBody
2018-01-15 11:59:00 -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
22b4809891 leave m_useGlobalVelocities to false, until enabled, for backward compatibility
use URDF_GLOBAL_VELOCITIES_MB flag in PyBullet loadURDF.
fix robot_bases.py due to new fields in getJointInfo.
backward compabitibility: BulletMJCFImporter, keep creating btMultiSphereShape for MJCF capsules with fromto, instead of shifted btCapsuleShapeZ, unless if CUF_USE_IMPLICIT_CYLINDER is used.
2018-01-10 11:16:50 -08:00
erwincoumans
c4b1b84687 Enable 'global absolute velocities' by default for btMultiBody. See 8.3.2B Proposed resolution Jakub Stepien PhD Thesis
https://drive.google.com/file/d/0Bz3vEa19XOYGNWdZWGpMdUdqVmZ5ZVBOaEh4ZnpNaUxxZFNV/view?usp=sharing
Fixes crashes due to rendering of softbody wireframe in the wrong thread (needs to be in 'debug' rendering section)
Use btCapsuleShapeZ instead of btMultiSphereShape when converting MJCF MuJoCo capsules using fromto
2018-01-09 22:47:56 -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
c59a3763e5 tweak ImportMJCFSetup.cpp example MJCF humanoid a bit, clamp target positions to be within joint limits to avoid solver problems (conflicting constraints)
add humanoid_manual_control.py PyBullet example which is similar to ImportMJCFSetup.cpp
2018-01-04 13:14:11 -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
4084c1cc71 also add serializeContactManifolds to btSoftMultiBodyDynamicsWorld.cpp and btDiscreteDynamicsWorld. 2017-12-30 14:20:20 -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
erwincoumans
5ab6a0ad43 Fix issue with cone friction, we had to accumulate squared residual, not just residual.
This fixes issue 1473, thanks to Avik De for reporting the issue.
2017-12-14 10:51:43 -08:00
Erwin Coumans
8c0913d96b Merge remote-tracking branch 'bp/master' 2017-12-01 10:25:43 -08:00
Erwin Coumans
c556ad651d expose pybullet 'enableConeFriction' to switch between pyramid and cone friction model. 2017-12-01 10:07:07 -08:00
Erwin Coumans
e1df1534f3 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-11-30 13:11:39 -08:00
erwincoumans
aa82003174 Update btMultiBodyConstraintSolver.h 2017-11-29 10:53:29 -08:00
erwincoumans
e76804173a Merge pull request #1463 from erwincoumans/master
fixes related to torsional friction, due to recent cone friction update.
2017-11-28 21:18:57 -08:00
erwincoumans
8ff75e11cd fixes related to torsional friction, due to recent cone friction update. 2017-11-28 20:09:56 -08:00
Erwin Coumans
b031ba0333 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-11-28 11:52:07 -08:00
Joey Liaw
bbc536d887 add const to masses for calculatePrincipalAxisTransform 2017-11-25 13:33:26 -08:00
erwincoumans
e6e3da11e5 Implement true implicit friction cone, instead of friction pyramid, for btMultiBody vs btMultiBody and btMultiBody vs btRigidBody
See data/sphere_small_zeroinertia.urdf for an example.
2017-11-23 17:38:23 -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
Erwin Coumans
b468f7c07b Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-11-16 10:48:37 -08:00