Commit Graph

874 Commits

Author SHA1 Message Date
Tigran Gasparian
9799f356de . 2018-08-31 15:35:35 +02:00
Tigran Gasparian
f132b4d16b Only make the change for Linux, since OSX doesn't have dlmopen() 2018-08-31 15:33:08 +02:00
Tigran Gasparian
6036c027bf Uses dlmopen() instead of dlopen() in b3PluginManager.cpp. This allows plugins to be loaded in a separate namespace, avoiding symbol conflicts. 2018-08-31 10:53:46 +02:00
Erwin Coumans
40a15053bd add createProtobufs.sh script for Mac/Linux (only tested on Mac so far) 2018-08-30 10:09:00 -07:00
erwincoumans
4f7dfc2069 Add preliminary GRPC server for PyBullet and BulletRobotics.
Will add GRPC client and PyBullet GRPC server plugin.
Will cover most/all SharedMemoryCommand/SharedMemoryStatus messages.
Run the server, then test using the pybullet_client.py
2018-08-29 21:12:13 -07:00
Erwin Coumans
72c48870b0 after picking in a multibody demo, allow sleeping for rigid bodies 2018-08-26 18:07:28 -07:00
Erwin Coumans
186ddb81d8 fix tab/space issue in Python file
fix determinism issue introduced in previous commit
2018-08-26 17:17:42 -07:00
Erwin Coumans
6ab6cf0bdb test if different broadphase maintains determinism 2018-08-26 16:49:17 -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
78946c8ca7
Merge pull request #1842 from crewmatt/crewmatt-ikoriginalpositions
Allow current positions for Calculate IK.
2018-08-23 23:07:48 -07:00
Erwin Coumans
61b7591b8e expose choice of contraint solver in PyBullet, with switchConstraintSolver example 2018-08-23 23:04:17 -07:00
mbennice
780b280181 Allow current positions for Calculate IK.
Allows the user to specify the current positions of joints when
calculating Inverse Kinematics.
2018-08-23 13:19:15 -07:00
Erwin Coumans
15e831ab99 revert default linear slop, need to handle restitution separately 2018-08-09 16:49:25 -07:00
Erwin Coumans
56e7333941 bump up pybullet version 2018-08-04 09:58:15 -07:00
erwincoumans
961d8adad1
Merge pull request #1806 from erwincoumans/master
prepare build system(s) for collisionFilterPlugin
2018-08-03 17:43:13 -07:00
Tigran Gasparian
d93980f89f Adds a simulation stepped notification
This notification is called when the simulation is stepped, regardless
of whether any objects have moved.
2018-08-01 17:49:58 +02:00
Erwin Coumans
2cab56d6ef prepare build system(s) for collisionFilterPlugin 2018-07-27 15:48:24 +02:00
erwincoumans
8b27a7311c
Merge pull request #1801 from RanTig/TickPlugins
Notify plugins on certain events (e.g. body added).
2018-07-27 14:58:55 +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
Tigran Gasparian
35a55b2056 Changes tickPlugins to reportNotifications and only calls the processNotifications function on the plugins when there are actually notifications available. tickPlugins will to into a separate PR. 2018-07-25 14:47:34 +02:00
Tigran Gasparian
f745eafb36 Changes dynamic_cast<> to c-style cast. 2018-07-24 16:04:16 +02:00
Tigran Gasparian
c59afb88c4 Notify plugins on certain events (e.g. body added).
This also adds a periodic tick function to plugins, giving them periodically control over the simulation thread, even when the simulation is paused.
2018-07-24 14:12:16 +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
erwincoumans
3d5c921495
Merge pull request #1782 from RanTig/userdata
Changes UserData to use global identifiers and makes linkIndex optional.
2018-07-09 11:36:51 +02:00
Erwin Coumans
f8cc33f3a3 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2018-07-08 11:24:37 +02:00
Erwin Coumans
127b82ec1b expose texture unique id after loading URD file, so you can restore to the original texture after changing it to a custom texture. See also getTextureUid.py example. 2018-07-08 11:23:12 +02:00
Tigran Gasparian
49684144dc Some minor formatting fixes 2018-07-05 16:01:03 +02:00
Tigran Gasparian
8a6db042de Removes int initializer in SharedMemoryUserDataHashKey, changes '>>' into '> >' for nexted templates. 2018-07-04 14:25:48 +02:00
Tigran Gasparian
7c7e8af717 Increases the shared memory magic number. 2018-07-04 10:22:44 +02:00
Erwin Coumans
2ce1e65b53 PyBullet: tweak in TCP server for VR - ROS bridge 2018-07-03 16:30:54 -07:00
Tigran Gasparian
9c7aa3a863 Changes UserData to use global identifiers and makes linkIndex optional.
This removes the need to specify the body id/link index when retrieving a user data entry.
Additionally, user data can now optionally be set to visual shapes as well.

The following public pybullet APIs have changed (backwards incompatible)
addUserData and getUserDataId
  Makes linkIndex parameter optional (default value is -1)
  Adds optional visualShapeIndex parameter (default value is -1)

getUserData and removeUserData
  Removes required parameters bodyUniqueId and linkIndex

getNumUserData
  Removes required bodyUniqueId parameter

getUserDataInfo
  Removes required linkIndex parameter
  Changes returned tuple from (userDataId, key) to (userDataId, key, bodyUniqueId, linkIndex, visualShapeIndex)
2018-07-03 17:45:19 +02:00
erwincoumans
98fc4b1510 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2018-07-01 14:42:48 -07:00
erwincoumans
0d8564db22 PyBullet: added preliminary DART and MuJoCo backend files, MuJoCo can loadMJCF, stepSimulation and getBasePositionAndOrientation, DART is empty.
PyBullet: add 2d biped example.,
2018-07-01 14:42:32 -07:00
Erwin Coumans
bfc85ff1fd PyBullet: TCP connection, optimized getVREvents to allow faster Windows -> Linux Vive tracking state communication. 2018-06-27 23:43:42 -07:00
Erwin Coumans
21b089b0d7 Merge remote-tracking branch 'bp/master' 2018-06-26 08:57:44 -07:00
YunfeiBai
812c229736 Remove the pdController when maxForce = 0 2018-06-24 17:06:16 -07:00
erwincoumans
49b0ec08e1 PyBullet: allow to replace existing debug lines in addUserDebugLine through the replaceItemUniqueId argument
See batchRayCast.py for example usage
2018-06-22 16:47:20 -07:00
Tigran Gasparian
618e3230a4 Fix: Use function context reference instead of value 2018-06-22 20:41:02 +02: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
42c9d9aa3c lazy creation of batch scheduler, it causes issues with the physics. 2018-06-16 13:59:03 -07:00
erwincoumans
7924d51665 PyBullet: deal with backward compatibility of b3RaycastBatchAddRay:
use b3RaycastBatchAddRays API to enable MAX_RAY_INTERSECTION_BATCH_SIZE_STREAMING num rays.
Old API (b3RaycastBatchAddRay) sticks to 256 rays, MAX_RAY_INTERSECTION_BATCH_SIZE.
2018-06-16 12:28:21 -07: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
23f9250e04 Merge remote-tracking branch 'bp/master' 2018-06-16 06:58:10 -07:00
erwincoumans
d660042d76
Merge pull request #1763 from YunfeiBai/master
Add the pdControlPlugin to the joint control C API, and add the PD co…
2018-06-16 06:57:50 -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
erwincoumans
bb8cbcdaae Merge remote-tracking branch 'bp/master' 2018-06-16 06:06:18 -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
YunfeiBai
1c0de3c4cb Add the pdControlPlugin to the joint control C API, and add the PD control mode (also available in pybullet). Modify the pdControl pybullet example to use the PD control mode with setJointMotorControl API. 2018-06-15 17:59:26 -07:00