Commit Graph
2229 Commits
Author SHA1 Message Date
erwincoumans a9299fbd0c Merge pull request #1853 from erwincoumans/master
fix crash in btInternalEdgeUtility when a mesh is not the expected type
2018-08-31 14:12:43 -07:00
Erwin Coumans 9a26d4aaaf fix type 2018-08-31 09:59:18 -07:00
Erwin Coumans f1cb4fe29c fix crash in btInternalEdgeUtility when a mesh is not the expected type
(don't wrap a mesh in a btCompoundShape if you want to use the edge utility)
2018-08-31 09:25:49 -07:00
erwincoumans 4bf846822f Merge pull request #1850 from erwincoumans/master
Add preliminary GRPC server for PyBullet and BulletRobotics.
2018-08-30 19:40:13 -07:00
erwincoumans ee9fca8c29 GJK fix for https://github.com/bulletphysics/bullet3/issues/1703
In a nutshell, we added a more reliable check, based on if the origin is in the GJK simplex, to determine if we are really intersecting and need to run EPA.
See also "Real-time Collision Detection with Implicit Objects" by Leif Olvang
Todo: integrate the simplex penetration check directly inside the Bullet btVoronoiSimplexSolver
and remove this temporary code from libCCD
Note, for large differences in shapes, use double precision build!
2018-08-30 18:35:51 -07:00
erwincoumans 4d00beefbb Merge pull request #1849 from madebr/fix_1827
Fix for bug #1827
2018-08-29 20:54:31 -07:00
Erwin Coumans 2668b89740 fix another island issue 2018-08-26 22:25:39 -07:00
Erwin Coumans ff43cea263 Fix some deactivation issues with btMultiBodyDynamicsWorld, should also improve performance for PyBullet with larger worlds
(even when sleeping is disabled, islands are split)
2018-08-26 16:14:36 -07:00
erwincoumans aace31c1fa Merge pull request #1843 from rhaschke/master
preserve constness to avoid compiler warnings
2018-08-23 23:06:54 -07:00
Erwin Coumans 61b7591b8e expose choice of contraint solver in PyBullet, with switchConstraintSolver example 2018-08-23 23:04:17 -07:00
Robert Haschke beb3dd6196 reduce diff 2018-08-24 00:34:16 +02:00
Robert Haschke 5088f71e7f preserve constness to avoid compiler warnings 2018-08-24 00:29:54 +02:00
Colin Basnett 5bdfba1ea6 Fix for bug #1827 2018-08-14 19:36:42 +02:00
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 https://github.com/ros/urdfdom_headers/blob/e7e0972a4617b8a5df7a274ea3ba3b92e3895a35/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