Commit Graph

2266 Commits

Author SHA1 Message Date
Jeongseok Lee
340236ee29 Fix copy & paste mistake 2018-08-07 15:16:46 -07:00
Jeongseok Lee
e8e97d39fe Merge remote-tracking branch 'upstream/master' into multibody_mlcp_solver_v2 2018-08-06 10:34:43 -07:00
Erwin Coumans
684b69f4dd fix applied too fast 2018-08-03 17:57:09 -07:00
Erwin Coumans
02b0e34bda v_ptr 2018-08-03 17:53:07 -07:00
Erwin Coumans
97baccd1a5 revert regression in btMultiBody.cpp 2018-08-03 17:38:01 -07:00
Jeongseok Lee
809fb3ed49 Use btAssert instead of assert 2018-08-03 13:46:59 -07:00
Jeongseok Lee
89c6a83ae9 Add MLCP constraint solver for multibody 2018-08-02 22:53:30 -07:00
Erwin Coumans
2000ba9058 handle singularity (gimbal lock) in quaternion -> euler conversion,
from e7e0972a46/urdf_model/include/urdf_model/pose.h (L103)
2018-07-30 17:30:19 +02:00
Erwin Coumans
5dd7a62397 Disable CProfileManager by default.
Use btSetCustomEnterProfileZoneFunc(CProfileManager::Start_Profile) and
btSetCustomLeaveProfileZoneFunc(CProfileManager::Stop_Profile) to get old behavior.
2018-07-30 12:07:32 +02:00
Erwin Coumans
2cab56d6ef prepare build system(s) for collisionFilterPlugin 2018-07-27 15:48:24 +02:00
erwincoumans
fa41e2945c Merge pull request #1804 from erwincoumans/master
fix memory leak reported in Issue #1800
2018-07-27 14:50:45 +02: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
erwincoumans
0c66696e19 Merge pull request #1803 from mbeards/id_macro_collision
Renamed error_message and warning_message macros.
2018-07-24 22:54:03 +02:00
Michael Beardsworth
3f03b41091 Renamed error_message and warning_message macros.
error_message and warning_message are common strings that are likely to
collide. Renamed to bt_id_{error,warning}_message to more strongly
uniquify.

grep -r error_message -l src/BulletInverseDynamics | \
  xargs sed -i -e "s/error_message/bt_id_error_message/g"

grep -r warning_message -l src/BulletInverseDynamics | \
  xargs sed -i -e "s/warning_message/bt_id_warning_message/g"
2018-07-24 11:32:08 -07:00
Erwin Coumans
f0c8bbf1a1 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2018-07-24 15:21:12 +02:00
Erwin Coumans
f91e5c573c use the maximum square residual instead of sum 2018-07-24 15:20:34 +02:00
Erwin Coumans
bd7c3825bb Merge remote-tracking branch 'bp/master' 2018-07-22 13:04:44 +02:00
Erwin Coumans
7a27cb1739 body1 -> bodyA and body2 -> bodyB 2018-07-22 13:03:53 +02:00
erwincoumans
defd961f60 Merge pull request #1798 from erwincoumans/master
Change constraint solver threshold-based termination condition on res…
2018-07-22 12:28:32 +02:00
Erwin Coumans
b5495e789d Change constraint solver threshold-based termination condition on residual of velocity threshold, not on residual of impulse threshold.
This avoids issues with systems with large mass ratios.

Test: add this to BasicDemo/BasicExample.cpp in initPhysics

	m_dynamicsWorld->getSolverInfo().m_numIterations = 1000;
	m_dynamicsWorld->getSolverInfo().m_leastSquaresResidualThreshold = 1e-4;
2018-07-22 11:30:16 +02:00
Jeongseok Lee
deea2bb411 Use const reference for referencing existing members 2018-07-09 20:59:29 -07:00
Jeongseok Lee
6dbdf02808 Minor code optimization in multibody forward dynamics 2018-07-09 20:54:13 -07:00
Erwin Coumans
6549b0a586 re-enable optional tracking of memory allocations (disabled by default) 2018-06-26 09:19:10 -07: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
Tigran Gasparian
b84eb8af74 Several fixes for the parallel raycasts
- Limits the maximum number of threads to 64, since btThreadSupportPosix
and btThreadsupportWin32 don't support more than 64 bits at this moment,
due to the use of UINT64 bitmasks. This could be fixed by using
std::bitset or some other alternative.
- Introduces a threadpool class, b3ThreadPool, which is a simple wrapper
around btThreadSupportInterface and uses this instead of the global task
scheduler for parallel raycasting. This is actually quite a bit faster
than the task scheduler (~10-15% in my tests for parallel raycasts),
since the advanced features (parallelFor) are not necessary for the
parallel raycasts.
- Puts 16*1024 of MAX_RAY_INTERSECTION_MAX_SIZE_STREAMING in
parentheses, since it otherwise causes problems with other operators
of equal precedence and introduces a smaller constant for Apple targets.
- Refactors the parallel raycasts code and adds some more profiling.
2018-06-19 18:41:42 +02:00
erwincoumans
04d03d10be Fix memory leak due to batchRayCast never deleting the btTaskScheduler.
(and issue with TaskScheduler/btTaskScheduler.cpp, add JobQueue::exit, call it first, since it uses the m_threadSupport which was deleted before the destrucor was called.
Use a hashmap to store user timers, to avoid allocating many identical strings.
2018-06-16 09:37:53 -07:00
erwincoumans
cb1fce7899 revert exposing getSharedMemoryStreamBuffer / adding to command structure
use 16k rays by default
add uploadRaysToSharedMemory method
2018-06-16 08:14:00 -07:00
erwincoumans
f517b03534 Expose pushProfileTimer / pop ProfileTimer in PhysicsClient API to benchmark Python parts of PyBullet.
reduce 'm_cooldownTime' from 1000 microseconds to 100 microseconds (overhead in raycast is too large)
If needed, we can expose this cooldown time.
Replace malloc by btAlignedObjectArray (going through Bullet's memory allocator)
2018-06-16 06:19:49 -07:00
Erwin Coumans
fbbd675ed6 expose PyBullet API to wakeup/put objects to sleep, enable/disable deactivation
fix wakeup -> reset deactivation clock
2018-06-15 21:26:26 -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
Erwin Coumans
134beaf8dc fix uninitialized m_companionId in btMultiBody (only happens if sleeping is enabled) 2018-06-05 16:40:41 -07:00
erwincoumans
fa648a028e fix a few problems introduced in #1730
https://github.com/bulletphysics/bullet3/pull/1730
2018-06-05 09:16:00 -07:00
Tigran Gasparian
bb72a91080 Clears the user data cache when syncUserData is called.
Adds unit test for the UserData functons.
Changes the char pointer in btHashString to std::string. There were
problems where the object owning the string memory would deallocate the
string, making the btHashString object invalid.
2018-06-04 15:10:48 +02:00
erwincoumans
b6120e760a PyBullet.addUserData / getUserData / removeUserData / getUserDataId / getNumUserData / getUserDataInfo
See examples/pybullet/examples/userData.py how to use it. TODO: add to PyBullet Quickstart Guide.
Thanks to Tigran Gasparian for the contribution!
2018-06-02 13:40:08 -07:00
erwincoumans
a450600eb8 revert gjk test 2018-06-01 22:17:46 -07:00
erwincoumans
e721a9cdf5 revert testing changes 2018-06-01 22:02:17 -07:00
erwincoumans
54ddbad29f remove printf 2018-06-01 21:56:34 -07:00
erwincoumans
92579f9196 Merge branch 'master' of https://github.com/erwincoumans/bullet3
# Conflicts:
#	examples/SharedMemory/PhysicsServerCommandProcessor.cpp
2018-06-01 09:35:15 -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
erwincoumans
ec4b3505a4 fix fixed constraint between btMultiBody and btRigidBody 2018-05-29 16:49:07 -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