Commit Graph

500 Commits

Author SHA1 Message Date
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
424a29474f fix for division by zero, in case angular velocity goes close to zero
(but not zero)
2017-05-11 17:45:01 -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
Erwin Coumans
af6bf8ddc8 plumb URDF/SDF audio_source into PhysicsServerCommandProcessor, allow to play sounds on collision !
See also https://youtu.be/eppOjTfx5Jg for a first test, and this modified URDF how to add sounds:
https://github.com/bulletphysics/bullet3/blob/master/data/plane_with_collision_audio.urdf
Add the --audio flag to enable sound in pybullet/Bullet-C-API
2017-05-01 11:14:09 -07:00
nicolaichuk
2c6c64ca8a Merge remote-tracking branch 'remotes/bulletphysics/master' 2017-03-29 18:22:53 +03:00
Erwin Coumans
7503418c72 Split Bullet/src/LinearMath/btSerializer.cpp into btSerializer64.cpp to make it easier to rebuild serialization structure.
Add several MSVC optimization flags to cmake.
Bump up VERSION because serialization format changed
Expose btScalar& jointMaxForce, btScalar& jointMaxVelocity to 'getJointInfo2' API, add backwards compatibility to examples\Importers\ImportURDFDemo\URDFImporterInterface::getJointInfo.

pybullet: expose 4 more fields to getJointInfo: jointLowerLimit/jointUpperLimit/jointMaxForce/jointMaxVelocity
fix performance issue in CMD_ACTUAL_STATE_UPDATE_COMPLETED
2017-03-26 13:06:46 -07:00
Erwin Coumans
ee0e3ba271 Remove RobotLogging from CMakeLists.txt
Avoid crashing if threadIndex exceeds BT_QUICKPROF_MAX_THREAD_COUNT (64)
2017-03-23 18:00:00 -07:00
nicolaichuk
71e411c2ca fix warning "This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library" 2017-03-23 14:38:45 +03:00
nicolaichuk
5527e36139 Merge remote-tracking branch 'remotes/bulletphysics/master'
# Conflicts:
#	src/BulletCollision/CollisionDispatch/btCollisionWorldImporter.h
2017-03-23 14:28:49 +03:00
nicolaichuk
8e1b146568 Merge branch 'Branch_2.86.1' 2017-03-23 14:24:32 +03:00
nicolaichuk
db065b8af8 fix redefinition 2017-03-23 14:15:51 +03:00
erwincoumans
ef9afd39f7 Merge pull request #996 from iSLC/master
Adjust thread-local local static variable syntax for MinGW/GCC.
2017-03-13 21:52:06 -07:00
erwincoumans
41d7ee4f89 Merge pull request #1009 from cprogrammer1994/fix-compile-warnings
Fix some compiler warnings
2017-03-13 21:49:28 -07:00
Erwin Coumans
bdaadf57e0 apply _clang-format to Bullet/src/LinearMath/btScalar.h, disable around preprocessor defines
(issue with clang-format lacking preprocessor indentation support, see
https://bugs.llvm.org//show_bug.cgi?id=17362
and possibly apply this patch:
https://github.com/mkurdej/clang/tree/indent-pp-directives
)
2017-03-13 11:17:42 -07:00
Szabolcs Dombi
839086ac84 fix type conversion warnings 2017-03-13 18:30:44 +01:00
Sandu Liviu Catalin
bbb7e3c5f5 Adjust thread-local local static variable syntax for MinGW/GCC. 2017-03-08 00:46:39 +02:00
erwincoumans
18fb738f80 Merge pull request #992 from taylor001/dev
Fix warning when compiling with -Dundef on MinGW
2017-03-07 07:37:39 -08:00
Daniele Bartolini
af284122a3 Fix warning when compiling with -Dundef on MinGW 2017-03-06 19:27:21 +01:00
Erwin Coumans
dcc4c0bda8 fix uninitialized value in new btMatrix3x3::diagonalize 2017-03-03 16:02:12 -08:00
Erwin Coumans
0131754173 Add 'extractRotation' based on "A robust method to extract the rotational part of deformations"
///See http://dl.acm.org/citation.cfm?doid=2994258.2994269
Rewrite 'diagonalize' to use 'extractRotation', should fix Issue 846
2017-02-25 16:57:18 -08:00
yunfeibai
e12981fd45 Enable logging a specified list of objects for generic robot logging. 2017-02-20 12:17:12 -08:00
erwincoumans
72dd8285e8 fix 'safeNormalize' (probably should remove it)
Fix for Issue 953: cull degenerate triangles
https://github.com/bulletphysics/bullet3/issues/935
Thanks to Oleg Klimov for the report and reproduction case.
2017-01-30 18:12:09 -08:00
Erwin Coumans
d81d62a70b Prepare for Bullet 2.86 release, update version to 2.86 (release will be tagged soon)
protect some C-API methods against negative dof indices
add triangle mesh import from MJCF files
update to recent pybullet quickstart guide pdf
2017-01-20 11:48:33 -08:00
erwincoumans
e738d1ffde fix for iOS, add #include <TargetConditionals.h> 2017-01-13 12:06:13 -08:00
Erwin Coumans
5e6cfd70b5 iOS platform and Android don't have __thread local storage, so avoid multi-threaded profiler on those (only on _WIN32, __linux__ and __APPLE__ and not TARGET_OS_IPHONE
Add a Sleep(0) for Windows to yield threads (and not Sleep(1))
2017-01-08 12:49:04 -08:00
Erwin Coumans
8e554a0c1b allow creation of multiple shared memory segments 2017-01-06 09:49:03 -08:00
Erwin Coumans
a4cf0c8b11 Linux clock_gettime needs rt / librt, so put it behind BT_LINUX_REALTIME for now. 2016-12-26 22:00:39 -08:00
Erwin Coumans
7aa7c4dfee Linux needs #include <time.h>?
/home/travis/build/bulletphysics/bullet3/src/LinearMath/btQuickprof.cpp:251:19: error: ‘CLOCK_REALTIME’ was not declared in this scope
/home/travis/build/bulletphysics/bullet3/src/LinearMath/btQuickprof.cpp:251:37: error: ‘clock_gettime’ was not declared in this scope
2016-12-26 21:15:59 -08:00
Erwin Coumans
0917310521 add nanosecond resolution for Mac OSX clock / about://tracing timings 2016-12-23 18:18:35 -08:00
Erwin Coumans
4c06fd27b3 Example Browser: add option (keypress 'p') to dump json timing profile trace, that you can open using Chrome about://tracing
Make btQuickprof thread safe
Add option in btQuickprof to override custom timing profile (btSetCustomEnterProfileZoneFunc, btSetCustomLeaveProfileZoneFunc)
remove b3Printf in a user/physics thread (those added added, while drawing the GUI running in the main thread)
2016-12-23 15:20:04 -08:00
erwincoumans
214930922d make sure m_uniqueIdGenerator in btSerializer is initialized to zero, it can cause issues if not. 2016-11-05 12:53:40 -07:00
erwincoumans
5d66ce20e0 network UDP: transmit structural DNA to deal with version/platform differences.
pybullet: allow to specify shared memory key and hostname/port for UDP.
2016-11-04 17:06:55 -07:00
erwincoumans
908cb2def2 Merge pull request #851 from erwincoumans/master
serialization structures update, needed to be done since
2016-11-03 09:11:36 -07:00
erwin coumans
f74a35bacb serialization structures update, needed to be done since
recent addition of src/BulletCollision/CollisionDispatch/btCollisionObject.h
recent (since august 26, 2016) serialization dumps my be corrupt.
2016-11-03 07:11:31 -07:00
Lunkhound
1c3686ca51 MultiThreaded Demo:
- fixing various race conditions throughout (usage of static vars, etc)
 - addition of a few lightweight mutexes (which are compiled out by default)
 - slight code rearrangement in discreteDynamicsWorld to facilitate multithreading
 - PoolAllocator::allocate() can now be called when pool is full without
     crashing (null pointer returned)
 - PoolAllocator allocate and freeMemory, are OPTIONALLY threadsafe
     (default is un-threadsafe)
 - CollisionDispatcher no longer checks if the pool allocator is full
     before calling allocate(), instead it just calls allocate() and
     checks if the return is null -- this avoids a race condition
 - SequentialImpulseConstraintSolver OPTIONALLY uses different logic in
     getOrInitSolverBody() to avoid a race condition with kinematic bodies
 - addition of 2 classes which together allow simulation islands to be run
   in parallel:
    - btSimulationIslandManagerMt
    - btDiscreteDynamicsWorldMt
 - MultiThreadedDemo example in the example browser demonstrating use of
   OpenMP, Microsoft PPL, and Intel TBB
 - use multithreading for other demos
 - benchmark demo: add parallel raycasting
2016-10-30 12:47:27 -07:00
erwin coumans
ddff1bcdc0 remove some useless global constants, move them right into the constructor 2016-10-07 09:00:49 -07:00
Erwin Coumans
6563c9c821 add btVector3::safeNorm to avoid/workaround certain clang/g++ issue or returning -INF
when taking sqrtf(0.0000000000000000000000000000000000000108333558)
2016-09-25 23:13:23 -07:00
erwincoumans
c979f147e6 Update btQuaternion.h
add missing ; after btAssert
2016-09-25 15:12:19 -07:00
erwincoumans
278a89f7c3 Merge pull request #804 from erwincoumans/master
fix uninitialized variable in btMultiBody
2016-09-23 22:13:36 -07:00
erwincoumans
d3bf740c50 Merge pull request #446 from T4Larson/slerpfix
fix: btQuaternion.slerp() may result in NaN-quaternions
2016-09-23 22:03:01 -07:00
erwincoumans
fe6c8775da fix uninitialized variable in btMultiBody
use btAssert to detect 0 determinant in btMatrix3x3 inverse
Remove obsolete comment in PosixSharedMemory, the Windows shared memory implementation was done over a year ago
2016-09-23 21:59:38 -07:00
erwin coumans
32eccdff61 Create project file for BussIK inverse kinematics library (premake, cmake)
URDF/SDF: add a flag to force concave mesh collisiofor static objects. <collision concave="yes" name="pod_collision">
VR: support teleporting using buttong, allow multiple controllers to be used, fast wireframe rendering,
Turn off warnings about deprecated C routine in btScalar.h/b3Scalar.h
Add a dummy return to stop a warning
Expose defaultContactERP in shared memory api/pybullet.
First start to expose IK in shared memory api/pybullet (not working yet)
2016-09-08 15:15:58 -07:00
erwin coumans
c5164e503f fix in structure alignment of btMultiBodyLinkDoubleData and btMultiBodyDoubleData
causing serialization issue in  URDF/SDF loading in double-precision mode on Windows 32bit.
(it was fine on Mac/Linux 64bit)
bump serialization version to 2.85, as we change the file format
fix in name clash in makesdna.cpp -> intptr_t is already defined.
2016-08-26 10:00:29 -07:00
erwin coumans
62d5b7c5c0 add single step simulation, using 'o' key. use 'i' key to suspend simulation first
default background color a bit darker, to show debug lines
tweaked contact point rendering a bit
2016-08-19 10:30:02 -07:00
erwin coumans
25a1714754 disable CProfileManager, might reduce some multi-threading conflicts 2016-07-19 15:55:52 -07:00
Erwin Coumans
c54a61b97a More example code is memory-leak free now, in particular PhysicsServerExample.
/PhysicsServerCommandProcessor
also fixed some memory issue in InverseDynamicsExample (the base class is supposed to delete collision shape memory)
2016-07-16 21:29:31 -07:00
Erwin Coumans
e2bdd7dbb1 fix more memory leaks, ImportURDFExample is now leak-free
eliminate all run-time memory allocation (except for mouse-pick/ray-intersection) in ImportURDFExample
2016-07-16 17:40:44 -07:00
Erwin Coumans
2caa2b7ff4 removed more memory leaks and improve btAlignedAllocator memory-leak debugging 2016-07-16 14:58:11 -07:00
Erwin Coumans
612e46614a fix (unused) SSE operator btMatrix3x3 ==, thanks to yyzone for the report/fix.
fixes 552
2016-06-04 13:16:06 -07:00
erwin coumans
f469a2cb49 update to tinyrenderer synthetic camera 2016-05-31 22:55:13 -07:00