bullet3/examples
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
..
BasicDemo CMakeLists glew to glad 2018-02-20 21:09:31 -08:00
Benchmarks Merge remote-tracking branch 'upstream/master' 2017-06-02 18:26:04 -07:00
Collision Add pybullet transparent.py example, transparency with global per-object sort in GLInstancingRenderer 2017-06-24 19:38:31 -07:00
CommonInterfaces expose PyBullet.SHARED_MEMORY_SERVER 2018-05-07 15:57:36 -07:00
Constraints Fix for #1582 2018-03-05 23:05:22 +01:00
DynamicControlDemo Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
Evolution revert due to crashes on windows, when simulation speed is increased 2017-06-05 14:15:51 -07:00
ExampleBrowser enable pdControlPlugin by default (requires pdControlPlugin.cpp and b3RobotSimulatorClientAPI_NoDirect.cpp) 2018-06-05 15:59:01 -07:00
Experiments/ImplicitCloth enable URDF loading throught the 'File/Open' menu 2015-05-01 11:42:14 -07:00
ExtendedTutorials Fix simple cloth example. Closes #1606 2018-03-21 18:52:59 -07:00
ForkLift Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
FractureDemo Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
GyroscopicDemo Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
HelloWorld Fix for issue 1007 2017-03-13 11:00:56 -07:00
Importers PyBullet.loadURDF, expose flags=URDF_INITIALIZE_SAT_FEATURES 2018-06-13 15:35:56 -07:00
InverseDynamics premake build system fixes 2018-01-09 12:23:25 -08:00
InverseKinematics Implement first pass of transparent graphics object for GLInstancingRenderer 2017-06-24 13:41:33 -07:00
LuaDemo fix Lua example 2016-03-10 21:15:23 -08:00
MultiBody pybullet.createCollisionShape, createVisualShape, createMultiBody, programmatic creation using ProgrammaticUrdfInterface 2017-06-03 10:57:56 -07:00
MultiThreadedDemo dynamicsWorldMt: make island mgr aware of whether a parallel solver is present and make handoff from parallel solver to solver-pool more explicit 2018-03-05 20:05:38 -08:00
MultiThreading fix some tsan issues (thread sanitizer) 2018-05-16 08:32:21 -07:00
OpenCL add saveStateToMemory/restoreStateFromMemory/setAdditionalSearchPath/getAPIVersion to Bullet Robotics API. 2018-06-09 13:54:22 -07:00
OpenGLWindow PyBullet: add option to cache graphics shapes for URDF files, handy for benchmarks with many duplicate robots 2018-05-23 13:26:00 +10:00
Planar2D Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
pybullet Adds multithreading support for batch ray casts. 2018-06-15 16:47:04 +02:00
Raycast Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
RenderingExamples pybullet.getCameraImage: preparation to expose link index in segmentation mask buffer 2017-12-28 10:18:35 -08:00
RigidBody Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
RoboticsLearning fix getLinkState usage 2018-06-12 17:00:16 -07:00
RobotSimulator exposed a few more methods in the C++ b3RobotSimulatorClientAPI (_NoDirect base class) 2018-06-09 19:40:12 -07:00
RollingFrictionDemo Remove debug code. 2017-06-02 17:40:50 -07:00
SharedMemory Adds multithreading support for batch ray casts. 2018-06-15 16:47:04 +02:00
SimpleOpenGL3 update imgui test 2018-02-24 14:57:49 -08:00
SoftDemo fix SoftDemo crash, due to changes in OpenGLGuiHelper rendering 2018-05-01 09:23:08 -07:00
StandaloneMain App_PhysicsServer_SharedMemory_VR: expose max_num_object_capacity and max_shape_capacity_in_bytes (and shared_memory_key) 2018-04-30 23:01:15 +02:00
ThirdPartyLibs fix some incompatibilities between google3/third_party/GL,EGL, glad 2018-05-03 09:06:30 -07:00
TinyAudio Add C++ version VRGloveSimulatorMain example, using the serial library. 2017-05-01 22:35:33 -07:00
TinyRenderer add segmask_linkindex.py example using p.getCameraImage(320,200,flags=p.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX) 2017-12-28 12:37:07 -08:00
Tutorial Fix for #1582 2018-03-05 23:05:22 +01:00
TwoJoint enable pdControlPlugin by default (requires pdControlPlugin.cpp and b3RobotSimulatorClientAPI_NoDirect.cpp) 2018-06-05 15:59:01 -07:00
Utils more fixes in pybullet_gym envs/data. 2017-08-27 19:34:00 -07:00
Vehicles Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
VoronoiFracture Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
CMakeLists.txt added TwoJoint example 2017-11-26 20:38:50 -05:00