Commit Graph

6739 Commits

Author SHA1 Message Date
Alexis David Jacq
a57c480f28
Update gym_locomotion_envs.py
As suggested in https://github.com/bulletphysics/bullet3/pull/1759. The default isDone lets done = alive<0, and a special case is made for halfcheetah, forcing done=False. 
I had to pass the 'alive' condition as an additive parameter of WalkerBaseBulletEnv.
2018-06-15 17:38:35 +02:00
Erwin Coumans
976fea4eca fix saveRestoreState.py example 2018-06-15 08:31:39 -07:00
Tigran Gasparian
d244cf6061 Changes the default number of rays per thread from 32 to 16, when the user lets Bullet decide. 2018-06-15 17:13:10 +02:00
Tigran Gasparian
08409cae9f Adds multithreading support for batch ray casts.
To enable the feature, enable the BULLET2_MULTITHREADING option.

Increases the number of rays that can go in a batch request by storing
them in the shared memory stream instead of the shared memory command.
Adds the API b3RaycastBatchSetNumThreads to specify the number of
threads to use for the raycast batch, also adds the argument numThreads
to the pybullet function rayTestBatch.
Rays are distributed among the threads in a greedy fashion there's a shared
queue of work, once a thread finishes its task, it picks the next
available ray from the task. This works better than pre-distributing the
rays among threads, since there's a large variance in computation time per ray.

Some controversial changes:
- Added a pointer to PhysicsClient to the SharedMemoryCommand struct, this
was necessary to keep the C-API the same for b3RaycastBatchAddRay, while
adding the ray to the shared memory stream instead of the command
struct. I think this may be useful to simplify other APIs as well, that
take both a client handle and a command handle.
- Moved #define SHARED_MEMORY_MAX_STREAM_CHUNK_SIZE to
SharedMemoryPublic. This was necessary for the definition of
MAX_RAY_INTERSECTION_BATCH_SIZE.
2018-06-15 16:47:04 +02:00
Erwin Coumans
0080cf7ed1 bump up pybullet version to 2.0.7 2018-06-13 22:36:12 -07:00
erwincoumans
997211650e
Merge pull request #1757 from erwincoumans/master
PyBullet.loadURDF, expose flags=URDF_INITIALIZE_SAT_FEATURES
2018-06-14 02:35:09 +00:00
erwincoumans
25c5e87dc2 PyBullet.loadURDF, expose flags=URDF_INITIALIZE_SAT_FEATURES 2018-06-13 15:35:56 -07:00
erwincoumans
946a59f2fe
Merge pull request #1756 from bulletphysics/erwincoumans-patch-4
Update btConvexConvexAlgorithm.cpp
2018-06-13 15:30:58 +00:00
erwincoumans
5f203df65a
Update btConvexConvexAlgorithm.cpp 2018-06-13 07:47:14 -07:00
erwincoumans
b75c63f2a2
Merge pull request #1755 from erwincoumans/master
path -> const
2018-06-13 04:40:38 +00:00
Erwin Coumans
c27fb4003e path -> const 2018-06-12 21:26:34 -07:00
erwincoumans
ce9f29e416
Merge pull request #1752 from bulletphysics/erwincoumans-patch-2
Update b3RobotSimulatorClientAPI_NoDirect.h
2018-06-13 04:18:26 +00:00
erwincoumans
4f0959a136
Update b3RobotSimulatorClientAPI_NoDirect.h 2018-06-12 21:17:43 -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
ce47fcc7f2
Merge pull request #1751 from bulletphysics/erwincoumans-patch-1
Update btOverlappingPairCache.h
2018-06-13 02:50:05 +00: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
08d84d6ce3 fix getLinkState usage 2018-06-12 17:00:16 -07:00
erwincoumans
4d6741f5cd PyBullet: expose STATE_LOGGING_ALL_COMMANDS and STATE_REPLAY_ALL_COMMANDS
See examples/pybullet/examples/commandLogAndPlayback.py for an example.
2018-06-12 16:56:45 -07:00
erwincoumans
459d07a302 add example for enableSAT, using separating axis test (instead of GJK) for contact between polyhedral convex hull shapes (and convex hull vs triangle in a concave triangle mesh) 2018-06-12 16:10:49 -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
a342af0382 remove getLinkState from API, it automatically calculated forwardKinematics and propagates velocities, which is very expensive. 2018-06-11 23:49:34 -07:00
erwincoumans
9f79011582
Merge pull request #1748 from erwincoumans/master
different way of sorting pairs,  exposed a few more methods in the C++ b3RobotSimulatorClientAPI
2018-06-12 01:00:04 +00: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
Erwin Coumans
38469deec7 getNumLinks -> getNumDofs, to make sure fixed objects don't transfer activation state 2018-06-11 11:41:33 -07:00
erwincoumans
fc61a3531e Merge remote-tracking branch 'bp/master' 2018-06-11 08:35:14 -07:00
erwincoumans
6fb3cf7a43 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2018-06-11 08:34:37 -07:00
erwincoumans
cb0e98c0a9
Merge pull request #1747 from erwincoumans/master
remove ANYmal meshes
2018-06-11 14:47:40 +00:00
Erwin Coumans
e74f86d148 remove ANYmal meshes 2018-06-11 07:44:05 -07:00
erwincoumans
6705d2d649
Merge pull request #1743 from erwincoumans/master
enable more unit tests in PyBullet, add BulletRobotics for premake build.
2018-06-11 02:06:46 +00:00
erwincoumans
3eebcd40ca exposed a few more methods in the C++ b3RobotSimulatorClientAPI (_NoDirect base class) 2018-06-09 19:40:12 -07:00
erwincoumans
7ac3e263ab add saveStateToMemory/restoreStateFromMemory/setAdditionalSearchPath/getAPIVersion to Bullet Robotics API. 2018-06-09 13:54:22 -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
erwincoumans
046a86cd84 add premake4.lua build for BulletRobotics target, C++ API, similar to PyBullet. Use BulletRobotics target for App_HelloBulletRobotics (without GUI) and App_RobotSimulator 2018-06-08 19:14:03 -07:00
erwincoumans
8a70afa4f6
Merge pull request #1736 from erwincoumans/master
remove some warnings
2018-06-06 19:22:19 -07:00
Erwin Coumans
6ca3fe18f5 fix previous commit 2018-06-06 16:33:52 -07:00
Erwin Coumans
1bcb54dc29 remove some warnings 2018-06-06 16:10:20 -07:00
Erwin Coumans
c02761d40b Merge remote-tracking branch 'bp/master' 2018-06-05 22:55:12 -07:00
Erwin Coumans
dd444fc6c4 reshuffle args 2018-06-05 21:09:00 -07:00
erwincoumans
c60cc4897c
Merge pull request #1735 from erwincoumans/master
fix another parameter name in header, in enableJointForceTorqueSensor
2018-06-05 19:59:38 -07:00
erwincoumans
cb6d76d6b5 fix another parameter name in header, in enableJointForceTorqueSensor 2018-06-05 19:59:00 -07:00
erwincoumans
bcf466ee4e
Merge pull request #1734 from erwincoumans/master
fix parameter name in header, computeForwardKinematics
2018-06-05 19:57:52 -07:00
erwincoumans
dff04c7f59 fix parameter name in header, computeForwardKinematics 2018-06-05 19:57:21 -07:00
erwincoumans
88008b400a
Merge pull request #1733 from erwincoumans/master
use new API b3CreateInProcessPhysicsServerFromExistingExampleBrowserA…
2018-06-05 19:54:37 -07:00
erwincoumans
72d3f45b05 use new API b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnect3 (not 2) 2018-06-05 19:54:08 -07:00
erwincoumans
4615774150
Merge pull request #1732 from erwincoumans/master
people are actually using this internal API, add a new one and keep o…
2018-06-05 19:45:04 -07:00
erwincoumans
4083088a3a people are actually using this internal API, add a new one and keep old one backward compatible
b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnect3 is the new one,
b3CreateInProcessPhysicsServerFromExistingExampleBrowserAndConnect2 old
2018-06-05 19:44:33 -07:00
erwincoumans
5ede227e94
Update robot_bases.py
remove print
2018-06-05 19:33:28 -07:00
erwincoumans
e9b7ab1c59
Merge pull request #1731 from erwincoumans/master
PyBullet / BulletRobotics: prepare for pdControlPlugin and collisionFilterPlugin, and allow to pick shared memory key in SHARED_MEMORY_SERVER
2018-06-05 18:01:12 -07:00