Commit Graph

2237 Commits

Author SHA1 Message Date
erwincoumans
332cbfa609 fix typo in previous commit 2018-10-06 18:37:51 -07:00
erwincoumans
71d4a90c98 btMultiBody: fix indexing issue causing wrong friction to be reported (has no effect, since we don't use warmstarting for multibody) 2018-10-06 15:25:22 -07:00
Erwin Coumans
42ae4e81a8 apply clang-format (on Mac, slightly different than running it on Windows) 2018-09-30 11:43:57 -07:00
erwincoumans
5bcd43711a PyBullet OpenGL/EGL hardware getCameraImage: use glViewport to reduce the glReadPixels calling cost dramatically for small images
PyBullet Allow OpenGL/EGL hardware to render segmentation mask. Use pybullet.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX or pybullet.ER_SEGMENTATION_MASK
PyBullet.removeBody fix indexing bug (use foundIndex, not i)
PyBullet bump up version to 2.2.3
2018-09-30 07:10:40 -07:00
erwincoumans
cdd56e4641
Merge pull request #1895 from erwincoumans/master
Code-style consistency improvement: _clang-format applied
2018-09-23 19:22:09 -07:00
erwincoumans
ab8f16961e Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
2018-09-23 14:17:31 -07:00
Lucas Walter
fbf4d946c4
Spelling fix: on-way -> one-way 2018-09-18 07:40:22 -07:00
erwincoumans
9553892770 PyBullet / BulletRobotics:
Implement collisionFilterPlugin, use setCollisionFilterPair to enable or disable collision detection between specific pairs of objects.
Also, expose setCollisionFilterGroupMask as PyBullet API and in urdf using the tag <collision group="1" mask="2"/>.
See examples/pybullet/examples/collisionFilter.py for an example.
PyBullet default: Lower the warmstarting factor, for maximal coordinates rigid bodies for more stable simulation.
Add btCollisionWorld::refreshBroadphaseProxy to easier recreate the broadphase proxy without adding/removing objects to the world.
2018-09-12 19:30:49 -07:00
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 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