Commit Graph

242 Commits

Author SHA1 Message Date
vabr-g
dd8fcad6d8
Include dlerror() in handling of failed dlopen()
X11OpenGLWindow::X11OpenGLWindow() ends up calling dlopen() to get libX11.
When this fails, it only reports that it failed, and what filename it was looking for.
This commit adds dlerror() to the error message, which makes investigating failures easier.
2020-02-14 15:32:40 +01:00
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
Erwin Coumans
763e25dd37 fix Mac Catalina pybullet build (setup.py) 2019-12-03 20:49:08 -08:00
Erwin Coumans
9ca957387f Deformables: enable double sided rendering, reduced the number of debug lines in regular rendering. 2019-11-12 20:08:49 -08:00
erwincoumans
96031789dd
Merge pull request #2315 from nbelakovski/nbelakovski/fix_mac_opengl
Call drawRect on Mac to fix OpenGL issue
2019-07-09 08:39:41 -07:00
nbelakovski
3b4831089b
Call drawRect on Mac to fix OpenGL issue
This fixes an issue on Mac where an OpenGL window doesn't show anything until it is resized.
2019-07-06 20:34:22 -07:00
erwincoumans
9e28737b57
Merge pull request #2298 from erwincoumans/master
configureDebugVisualizer: expose lightPosition, shadowMapResolution (texture resolution) and shadowMapWorldSize
2019-06-19 11:48:25 -07:00
erwincoumans
d762bc4e84
Merge pull request #2266 from devnexen/shader_example_build_fix
Fix shader example build / spotted by clang
2019-06-19 09:16:25 -07:00
Erwin Coumans
c3b7f39aaf expose shadowMapResolution (texture resolution) and shadowMapWorldSize (size in meters in world space)
expose pybullet.ConfigureOpenGLVisualizerRequest(lightPosition=[x,y,z], shadowMapWorldSize=10.5, shadowMapResolution=16384)
See examples/pybullet/examples/configureDebugVisualizer.py for an example.
This reimplements https://github.com/bulletphysics/bullet3/pull/2295 but without creating a new command/status and explicitly referring to the debug visualizer
(since the 'getCameraImage' also has a lightPosition)
2019-06-19 09:01:16 -07:00
Erwin Coumans
6160b52fd7 graphicsServer to workaround OpenGL issues on some servers. 2019-06-13 23:24:22 -07:00
David Carlier
66c4e20fd2 Fix shader example build / spotted by clang 2019-05-23 20:40:29 +01:00
erwincoumans
12e6478689
Merge pull request #2103 from erwincoumans/master
PyBullet deep_mimic backflip re-using original DeepMimic policy from Jason Peng
2019-02-11 05:45:21 -08:00
erwincoumans
9bddca873c allow pybullet_envs.deep_mimic.testrl --arg_file run_humanoid3d_backflip_args.txt to perform a backflip. Can only backflip twice, then drops on ground.
this deepmimic is still very slow, due to slow mass matrix/inverse dynamics computation. once spherical motor drive is enabled, it should be fast(er)
move pd_controller_stable to pybullet_utils for easier re-use
add plane_transparent.urdf to pybullet_data
allow spacebar in keyboardEvents (Windows for now)
2019-02-10 20:56:31 -08:00
erwincoumans
b574a360f5
Merge pull request #2055 from xantares/pybullet
Pybullet enhancements
2019-02-10 20:25:47 -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
Michel Zou
e9112a9f5f Install examples lib 2019-01-12 11:06:06 +01:00
erwincoumans
5e08808e69 Fix issue 1883, OpenGL 2.x doesn't have glGenerateMipmap 2018-12-22 11:42:29 -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
erwincoumans
ed49edc1af PyBullet change API (since it was broken): pybullet_changeVisualShape with textureUniqueId ==-1 will clear the texture
b3InitUpdateVisualShape doesn't take textureUniqueId by default. new API b3UpdateVisualShapeTexture to change texture (-1 will clear texture)
PyBullet/BulletRobotics: allow to reset the textureUniqueId to -1, to clear a texture
PyBullet/BulletRobotics: save all texture handles
2018-10-20 15:56:56 -07:00
bla
7cd962467e fix EGL issue related to glViewport in startRender method 2018-10-01 18:51:02 -07:00
erwincoumans
bfafd9b0ae Merge branch 'master' of https://github.com/erwincoumans/bullet3 2018-09-30 20:02:32 -07:00
erwincoumans
6d89413336 scaling striding is 4 (scaling+object uid) instead of 3, also for transparent objects 2018-09-30 20:02:12 -07:00
erwincoumans
0ffa9a97bd scaling striding is 4 (scaling+object uid) instead of 3, also for transparent objects 2018-09-30 19:52:19 -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
Erwin Coumans
b0971b4beb fix our internal build 2018-09-13 10:20:38 -07:00
erwincoumans
684a9f6a99 move stb_image/stb_image_write.cpp into a cpp file instead of random files with the magic 'STB_IMAGE_WRITE_IMPLEMENTATION' define
move setup.py back to eglRenderer extension, use pkgutil.get_loader('eglRenderer').get_filename()
disable dlmopen by default, unless B3_USE_DLMOPEN is defined.
2018-09-10 23:18:34 -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
erwincoumans
adb5c049c7 Thanks to @dchichkov for some of the fixes in the eglRendererPlugin!
Rename tinyRenderer -> eglRenderer in the eglRendererPlugin.
Allow to run the eglRendererPlugin to run on Windows (not in EGL mode but Win32OpenGLWindow mode)

Here is a script I tested on Windows:
~~~~~~~~~~~~
mport pybullet as p
import time

p.connect(p.DIRECT)
plugin = p.loadPlugin("e:/develop/bullet3/bin/pybullet_eglRendererPlugin_vs2010_x64_debug.dll","_eglRendererPlugin")
print("plugin=",plugin)
p.setGravity(0,0,-10)
p.loadURDF("plane.urdf",[0,0,-1])
p.loadURDF("r2d2.urdf")
pixelWidth = 320
pixelHeight = 220
while (1):
	p.stepSimulation()
	viewMatrix = [1.0, 0.0, -0.0, 0.0, -0.0, 0.1736481785774231, -0.9848078489303589, 0.0, 0.0, 0.9848078489303589, 0.1736481785774231, 0.0, -0.0, -5.960464477539063e-08, -4.0, 1.0]
	projectionMatrix  = [1.0825318098068237, 0.0, 0.0, 0.0, 0.0, 1.732050895690918, 0.0, 0.0, 0.0, 0.0, -1.0002000331878662, -1.0, 0.0, 0.0, -0.020002000033855438, 0.0]

	#img_arr = p.getCameraImage(pixelWidth, pixelHeight, viewMatrix,projectionMatrix, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
	img_arr = p.getCameraImage(pixelWidth, pixelHeight, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
	#print("img_arr=",img_arr)
	time.sleep(1)
~~~~~~~~~~~~~
2018-09-09 13:37:49 -07:00
Max Argus
425ecbd3e6 fix cmake, linux only (patch egl) 2018-08-30 13:24:25 +02:00
Max Argus
964a5116eb fix cmake + apple (patch egl) 2018-08-30 13:24:25 +02:00
Max Argus
902818894c fix cmake (patch egl) 2018-08-30 13:24:25 +02:00
Max Argus
05f82e8867 egl plugin working 2018-08-30 13:24:25 +02:00
Max Argus
f80f0c76a4 added egl plugin commit 2018-08-30 13:24:25 +02:00
Max Argus
1b95961617 fix build 2018-08-30 13:24:25 +02:00
Max Argus
a9ba3eb8cc fixed cmake 2018-08-30 13:24:25 +02:00
Max Argus
f0e7f266ef switched to new glad2 2018-08-30 13:24:25 +02:00
Max Argus
5dbf2373ad load gl with egl not glx 2018-08-30 13:24:25 +02: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
77c332bd88 PyBullet: add option to cache graphics shapes for URDF files, handy for benchmarks with many duplicate robots
See https://github.com/erwincoumans/pybullet_robots ANYmal.py for an example.
PyBullet: Expose p.setPhysicsEngineParameter(solverResidualThreshold=1e-2) (b3PhysicsParamSetSolverResidualThreshold), increases solver performance a lot
PyBullet: Expose p.setPhysicsEngineParameter(contactSlop) Set it to zero, to avoid issues with restitution.
PyBullet: Expose isNumpyEnabled, return True is PyBullet was compiled with NUMPY support for 'getCameraImage'.
PyBullet: Expose p.ChangeDynamics(objectUid, linkIndex, contactProcessingThreshold), to avoid issues of speculative/predictive contacts with restitution.
See also http://twvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming%20Track/Vincent_ROBERT_Track_ADifferentApproach.pdf
2018-05-23 13:26:00 +10:00
erwincoumans
034dfba3ae fix VR controllers only visible in one eye (remove stray glClear for testing planar reflection)
PyBullet: force both contactStiffness and contactDamping (report error otherwise)
2018-05-16 14:24:12 -07:00
YunfeiBai
e5036fbc3a Merge remote-tracking branch 'upstream/master' 2018-05-03 10:48:55 -07:00
YunfeiBai
aa6b8f66e9 Fixed a bug in projective texture shader. 2018-05-03 10:46:59 -07:00
Erwin Coumans
0c706eb08a fix some incompatibilities between google3/third_party/GL,EGL, glad 2018-05-03 09:06:30 -07: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
erwincoumans
b53facfc25
Merge pull request #1629 from erwincoumans/master
Preparation to add signed distance field collision detection.
2018-04-12 00:02:25 -07:00
erwincoumans
c2869e0a3c enable planar reflection in minitaur_gym_env.py and locomotion scenes 2018-04-11 08:50:29 -07:00