Commit Graph

51 Commits

Author SHA1 Message Date
Erwin Coumans
1be6a1d16b fix loadpanda video generation
remove duplicate code (formerly Windows ffpmeg needed different settings?)
2020-01-12 08:07:54 -08:00
Erwin Coumans
83bdef8254 add --mp4fps=30 command line parameter for ExampleBrowser (and using pybullet.connect(p.GUI, options="--mp4fps=30 --mp4=\"testvideo.mp4\"") 2020-01-11 12:19:42 -08:00
erwincoumans
ae8e83988b Add preliminary PhysX 4.0 backend for PyBullet
Add inverse dynamics / mass matrix code from DeepMimic, thanks to Xue Bin (Jason) Peng
Add example how to use stable PD control for humanoid with spherical joints (see humanoidMotionCapture.py)
Fix related to TinyRenderer object transforms not updating when using collision filtering
2019-01-22 21:08:37 -08:00
erwincoumans
bdda7af8d7 Use the kF_UseGjkConvexCastRaytest for more accurate picking
fix upAxis in some demos
2018-10-27 11:38:38 -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
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
erwincoumans
7369005402 pybullet, use eglPlugin statically instead of dynamic loading an Extension -DSTATIC_EGLRENDERER_PLUGIN
Fix compile errors of pybullet on Windows.
2018-09-09 15:23:26 -07:00
Max Argus
5e8ee98f2e fix OpenGL3App argument order 2018-08-30 13:24:25 +02:00
a
3d499c8a7a pybullet: added EGL render device and window_backend option.
EGL review.
EGL dynamic loading, windowType to int
moved to glad2
Require GL 3.3 as GLInstancingRenderer.cpp uses glVertexAttribDivisor
glad2 update with dynamic X11 added
removed old file
build fix
fix mac/win
EGL w/o c++11, off by default
fix premake
fixup: premake fix 2
2018-08-30 13:24:25 +02:00
Erwin Coumans
85db288a95 App_PhysicsServer_SharedMemory_VR: expose max_num_object_capacity and max_shape_capacity_in_bytes (and shared_memory_key)
Default values are:
int maxNumObjectCapacity = 128 * 1024;
int maxShapeCapacityInBytes = 128 * 1024 * 1024;
int shared_memory_key = -1
2018-04-30 23:01:15 +02:00
Erwin Coumans
b0984de046 preparation to replace glew by glad 2018-02-20 19:44:02 -08:00
Erwin Coumans
8bb40b632b allow to build GLFW version of Bullet examples on Linux (use premake4_linux --enable_glfw gmake) 2018-02-20 16:21:22 -08:00
erwincoumans
390f111547 enable option to use GLFW, instead of our own cross-platform X11/Cocoa/Windows OpenGLWindow classes 2017-09-19 21:10:54 -07:00
Erwin Coumans
9e5e0da9f4 move stb_image/stb_truetype.h and stb_image/stb_image_write.h to ThirdPartyLibs/stb_image folder 2017-06-22 08:48:18 -07:00
Erwin Coumans
b23cb1dd2c pybullet.createCollisionShape, createVisualShape, createMultiBody, programmatic creation using ProgrammaticUrdfInterface
(still preliminary, not ready for commit yet, see examples\pybullet\examples\createSphereMultiBodies.py)
2017-06-03 10:57:56 -07:00
Erwin Coumans
84d09cc18f Split CommonGfxVertex3D into two different ones, GfxVertexFormat0 and GfxVertexFormat1
Rewrite  GLInstancingRenderer::drawTexturedTriangleMesh
2017-05-24 13:05:16 -07:00
Erwin Coumans
2d04d39fcf bump up pybullet version, include <string.h> for memset 2017-05-23 22:41:08 -07:00
Erwin Coumans
db008ab3c2 Improve debug text/line rendering, can be use to draw frames and text in local coordinate of an object / link.
example:
kuka = p.loadURDF("kuka_iiwa/model.urdf")
p.getNumJoints(kuka)
pybullet.addUserDebugLine([0,0,0],[0,0,0.1],[0,0,1],trackObjectUniqueId=2,trackLinkIndex=6)
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],trackObjectUniqueId=2,trackLinkIndex=6)
Also allow to render text using a given orientation (instead of pointing to the camera), example:
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],textOrientation=[0,0,0,1], trackObjectUniqueId=2,trackLinkIndex=6)
Add drawTexturedTriangleMesh, for drawing 3d text.
Expose readSingleInstanceTransformToCPU, to extract position/orientation from graphics index.
updateTexture: allow to not flip texels around up axis
2017-05-23 22:05:26 -07:00
Erwin Coumans
2211a20ab6 remove 20 second time limit for ffmpeg 2017-03-30 12:38:13 -07:00
Erwin Coumans
59d16b2c42 expose video capture as logging command in b3RobotSimulatorClientAPI (C++) and pybullet (use STATE_LOGGING_VIDEO_MP4) 2017-03-16 09:13:33 -07:00
Erwin Coumans
63486a712c VR video recording, use command-line --mp4=videoname.mp4
tune gripper grasp example with tefal pan, 800Newton force.
URDF importer: if using single transform 1 child shape, don't use compound shape.
if renderGUI is false, don't intercept mouse clicks
add manyspheres.py example (performance is pretty bad, will look into it)
[pybullet] expose contactBreakingThreshold
2017-02-16 14:19:09 -08:00
yunfeibai
c92fd6120d EGL OpenGL window. 2017-02-06 16:22:17 -08:00
Erwin Coumans
8e9181f85c [MJCF import] add custom broadphase collision filter, for MJCF/MuJoCo compatibility
[MJCF import] improve MuJoCo importer, support collision filters
fixed a few more warnings
2017-01-16 08:23:49 -08:00
Erwin Coumans
d7d4fe5c45 fix compile issue (use constructor) 2016-12-28 22:24:03 -08:00
Lunkhound
1c3686ca51 MultiThreaded Demo:
- fixing various race conditions throughout (usage of static vars, etc)
 - addition of a few lightweight mutexes (which are compiled out by default)
 - slight code rearrangement in discreteDynamicsWorld to facilitate multithreading
 - PoolAllocator::allocate() can now be called when pool is full without
     crashing (null pointer returned)
 - PoolAllocator allocate and freeMemory, are OPTIONALLY threadsafe
     (default is un-threadsafe)
 - CollisionDispatcher no longer checks if the pool allocator is full
     before calling allocate(), instead it just calls allocate() and
     checks if the return is null -- this avoids a race condition
 - SequentialImpulseConstraintSolver OPTIONALLY uses different logic in
     getOrInitSolverBody() to avoid a race condition with kinematic bodies
 - addition of 2 classes which together allow simulation islands to be run
   in parallel:
    - btSimulationIslandManagerMt
    - btDiscreteDynamicsWorldMt
 - MultiThreadedDemo example in the example browser demonstrating use of
   OpenMP, Microsoft PPL, and Intel TBB
 - use multithreading for other demos
 - benchmark demo: add parallel raycasting
2016-10-30 12:47:27 -07:00
erwin coumans
29f3afe2a4 don't use GL_LINEAR_MIPMAP_LINEAR for shadow maps
optimize gpu upload (use glBufferSubData instead of glMapBuffer
Avoid checking char array against zero.
2016-10-14 15:06:09 -07:00
erwincoumans
33d9603e16 Add rudimentary 'saveWorld' command in shared memory API and pybullet, see examples/pybullet/saveWorld.py
Use trilinear filtering instead of bilinear
2016-10-12 23:03:36 -07:00
erwincoumans
fe6c8775da fix uninitialized variable in btMultiBody
use btAssert to detect 0 determinant in btMatrix3x3 inverse
Remove obsolete comment in PosixSharedMemory, the Windows shared memory implementation was done over a year ago
2016-09-23 21:59:38 -07:00
erwin coumans
db3122233f remove that odd triangle in the origin of samurai castle (VR)
add rolling/spinning friction to cube, remove it from plane/samurai.urdf
URDF2Bullet: support joint limits for revolute and prismatic, only if defined (if upper < lower, disable limit)
add some profiling markers to improve performance
2016-09-19 07:02:43 -07:00
erwin coumans
72e329962e fix ffmpeg mp4 generation under Windows as well.
remove static variables, make them local, to avoid multithreading issues.
2016-07-28 18:06:03 -07:00
Erwin Coumans
daf91de778 fix ffmpeg stream to create quicktime compatible videos 2016-07-27 09:11:08 -07:00
Erwin Coumans (Google)
98c6181ba8 fix screen width/height issue on Intel/Linux
add command-line option to set png_skip_frames when taking screenshot series
2016-07-26 15:36:21 -07:00
erwin coumans
f9762d63ab Removed many memoryleaks in Example Browser, reducing some technical debt.
When running the Example Browser with Basic Example, 'visual leak detector' show no leak.
Many other individual examples still leak, so it is work-in-progress.
Disabled the profiler window (too many leaks)
2016-07-16 00:55:56 -07:00
erwin coumans
797680a535 Remove memory leak in SimpleOpenGL3 example code 2016-07-14 20:42:00 -07:00
Erwin Coumans
10cc6f14cb add option to use hardware OpenGL renderer for synthetic camera 2016-07-12 18:16:13 -07:00
Erwin Coumans
aa4d2ae01d initial hookup of TinyRenderer to shared memory interface 2016-06-01 17:47:41 -07:00
erwin coumans
14aa666c6f preparation to receive camera image data from physics server
increase shadowmap world size default to 50 units (meter), 10 units (meter) was too small for most examples.
2016-05-31 10:23:04 -07:00
erwin coumans
606f78da43 work-in-progress tinyrenderer -> shared memory API synthetic camera image 2016-05-17 23:57:19 -07:00
Erwin Coumans
0d3440b388 fixes in Mac resizing example browser (if window size exceeds capability) 2016-05-03 23:46:29 -07:00
Erwin Coumans
f89d587a02 update tutorial for SIGGRAPH course
allow multiple graphing windows at the same time
2015-08-10 14:30:00 -07:00
Erwin Coumans
edaa92c286 fix retina API 2015-08-07 16:21:33 -07:00
erwin coumans
a5669d2ffd add a textured sphere8.obj test with obj loader
fix shaders, so that shadowed and non-shadowed are matching
fix registerGraphicsUnitSphereShape API (level of detail), support textured sphere too
add support for textured cube
add start for a Tutorial.cpp
2015-08-05 19:03:27 -07:00
erwincoumans
b316f30040 improve usability of ExampleBrowser
store command-line arguments in bulletDemo.txt
save/load of configuration, save demo name instead of index
add setBackgroundColor as example (background_color_red) and
mouse move/wheel speed config (mouse_wheel_multiplier and mouse_move_multiplier)
(saved after changing the demo)
default btIDebugDraw colors can be changed
b3CommandLineArgs::GetCmdLineArgument returns bool, and b3CommandLineArgs::addArgs added
fix copy/paste
2015-08-04 18:24:30 -07:00
Erwin Coumans
26531f3fbc fix some warnings, disable gimpact by default in world importer,
use DIRECTLY_UPDATE_VELOCITY_DURING_SOLVER_ITERATIONS by default for now,
until we find the issue with some failing test cases in btMultiBody
fix a crashing issue in MyMultiBodyCreator.cpp (uninitialized variable)
disable excessive debug printf in URDF2Bullet
2015-07-27 13:28:47 -07:00
erwincoumans
68b53feb9c add Inverted Pendulum example with PD control 2015-07-16 23:58:36 -07:00
=
cedd0432bf don't compile SimpleOpenGL3App if NO_OPENGL3 is defined 2015-05-07 14:11:17 -07:00
erwin coumans
5b34cda617 add simple 3d debug text for OpenGL2 in example browser 2015-05-06 16:11:03 -07:00
erwincoumans
b33d17f91c rename GL/glew to CustomGL/glew.h to avoid clashes with system glew 2015-04-16 15:29:39 -07:00
erwincoumans
57d8567ca3 more example refactoring 2015-04-16 15:16:13 -07:00