Commit Graph

126 Commits

Author SHA1 Message Date
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
cabef63b1c expose the double sided flag 2019-11-12 20:36:20 -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
Xuchen Han
0b391798b7 hook deformable world into the physics server 2019-09-04 18:48:00 -07:00
Erwin Coumans
88d1788ee5 PyBullet: allow to update an existing heightfield shape
Also, use flags = p.GEOM_CONCAVE_INTERNAL_EDGE to enable internal edge filtering for heightfield (disabled by default)
See https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/examples/heightfield.py
2019-08-14 21:06:10 -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
ee3680765e fixes for RemoteGUIHelper 2019-06-14 14:34:56 -07:00
Erwin Coumans
6160b52fd7 graphicsServer to workaround OpenGL issues on some servers. 2019-06-13 23:24:22 -07:00
erwincoumans
f28fd91e4f add raycast accelerator for btHeightfieldTerrainShape, thanks to Marc Zylann, see https://github.com/bulletphysics/bullet3/pull/2062
it can be disabled by setting the flag cb.m_flags |= btTriangleRaycastCallback::kF_DisableHeightfieldAccelerator;
acceleration is disabled for z axis up.
add btHeightfieldTerrainShape example to example browser
2019-04-15 21:55:29 -07:00
Erwin Coumans
58c638d5ee tweak mouse wheel multiplier 2019-03-08 07:43:50 -08:00
erwincoumans
23dd0b50f9 apply mouse move multiplier 2019-03-03 11:35:30 -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
f9f8d0fbb0 example for fileIOPlugin.py loading SDF and its assets from a single zipfile,
also show how to disable file caching (used in the fileIOPlugin)
2018-11-17 14:11:01 -08:00
erwincoumans
078887c4d7 PyBullet fileIOPlugin: don't add equal fileIO interface twice (based on identical fileIOType and pathPrefix)
loadBullet goes through fileIOPlugin
2018-10-29 10:25:40 -07: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
dba239fe8d First pass of load files through an interface (to allow loading from memory, zip file etc). So instead of posix fopen/fread, using CommonFileIOInterface.
A fileIO plugin can override custom file IO operations. As a small test, load files from a zipfile in memory.
Default fileIO implementation is in examples/Utils/b3BulletDefaultFileIO.h
Affects URDF, SDF, MJCF, Wavefront OBJ, STL, DAE, images.
2018-10-08 21:27:08 -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
233a7083d1
Merge pull request #1790 from BlGene/egl-plugin
OpenGL render plugin
2018-09-09 09:27:15 -07:00
erwincoumans
5164f2f9a7 remove pre-build proto/grpc files (they differ for each platform and proto/grpc version) 2018-09-07 15:44:33 -07: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
72c48870b0 after picking in a multibody demo, allow sleeping for rigid bodies 2018-08-26 18:07:28 -07:00
Erwin Coumans
ac59886960 fix hidden API 2018-06-27 07:39:56 -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
Erwin Coumans
7383843b24 expose PyBullet.SHARED_MEMORY_SERVER
connect from 1 different PyBullet client using PyBullet.SHARED_MEMORY)
(don't use more than 1 other client to submit commands in parallel)
2018-05-07 15:57:36 -07:00
erwincoumans
ffc808784b PyBullet: add planar reflection example,
See examples/pybullet/examples/addPlanarReflection.py
2018-04-11 01:03:36 -07:00
Erwin Coumans
aae19514ac make the method not pure virtual (it breaks some internal code) 2018-03-27 10:18:00 -07:00
yunfeibai
6b97e1e604 Expose API to set projective texture instead of using global. 2018-03-20 21:28:47 -07:00
yunfeibai
37696dd87e Add Bullet C API and pybullet API to set projective texture matrices. 2018-03-18 18:45:54 -07:00
erwincoumans
90b34680b0
Merge pull request #1572 from erwincoumans/master
explicitly remove textures during resetSimulation
2018-02-22 08:37:03 -08:00
erwincoumans
73a4334e30 explicitly remove textures during resetSimulation
move glViewport to Win32Window
2018-02-21 23:22:16 -08:00
yunfeibai
08548e1ef0 Add example for projective texture. 2018-02-11 13:50:45 -08:00
Erwin Coumans
e97b751781 further work on urdfEditor.py, fix some serialization issues 2018-01-08 12:25:56 -08:00
erwincoumans
29aa9cb789 Bullet bump up to version 2.88
add preliminary support to import btMultiBody from a .bullet file (will help save/restore state)
fix some Windows char/widechar issues
2017-11-22 18:12:02 -08:00
erwincoumans
81146a4090 pybullet: move RGB,depth, segmentation mask preview windows to the right
remove some dead code from PhysicsServerCommandProcessor.cpp
2017-11-18 13:21:20 -08:00
erwincoumans
ed8de36ffa pybullet: allow to replace existing text, to avoid flickering (remove/add)
allow texture caching (disable using the disable file caching)
2017-10-25 08:15:01 -07:00
erwincoumans
b572fe43f9 fix signal handling in ExampleBrowser on linux/mac on termination
expose all analogue axes from OpenVR (5 controllers, each x,y -> 10 floats) in pybullet.getVREvents(allAnalogAxes=1)
2017-10-05 12:59:58 -07:00
Erwin Coumans
88897cc744 implement pybullet.changeTexture. For now, the width/height has to match the target texture unique id, otherwise crashes may happen (a check for width/height match will be added)
See also examples\pybullet\examples\changeTexture.py
2017-06-30 19:11:43 -07:00
Erwin Coumans
dd3d55610b fixes in pybullet.loadTexture, changeVisualShape replacing texture.
(also works for OpenGL3 renderer now)
2017-06-30 13:35:07 -07:00
erwincoumans
a651cb9ab4 Implement first pass of transparent graphics object for GLInstancingRenderer
remove 'enableBlend' from API, graphics instances use alpha component instead
fix forward axis for SimpleCamera
2017-06-24 13:41:33 -07:00
Erwin Coumans
c84416d932 add debug view for getCameraImage (RGB, depth, segmentation mask) 2017-06-13 10:53:24 -07:00
yunfeibai
bfcbb339cf Merge remote-tracking branch 'upstream/master' 2017-06-02 18:26:04 -07:00
yunfeibai
0a29c8d9af Get debug visualizer camera yaw, pitch, dist, and target. 2017-06-02 18:24:51 -07:00
yunfeibai
e6d1a8cf97 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
Erwin Coumans
87293e835c implement specular, URDF non-standard specular part (see sphere2.urdf) and SDF specular support.
pybullet.changeVisualShape(obUid,linkIndex,specularColor=[R,G,B]) and Bullet C-API b3UpdateVisualShapeSpecularColor
Bug fixes in b3ResourcePath::findResourcePath resolution.
add stadium.sdf and roboschool/models_outdoor/stadium assets https://github.com/openai/roboschool/tree/master/roboschool/models_outdoor/stadium
minor fixes to obj2sdf
2017-06-01 12:32:44 -07:00
erwincoumans
83f910711a Prepare/allow for non-Bullet2-based physics command processor in pybullet/Bullet-C-API
!!! Make sure to add examples/SharedMemory/PhysicsServerExampleBullet2.cpp to your build system, if needed
Bump up pybullet to version 1.0.9
2017-05-30 19:54:55 -07:00
Erwin Coumans
9743bb387c give some pure-virtual methods default empty implementation, avoid breaking some internal research code 2017-05-24 19:30:06 -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
9f7d7fecd5 more rendering fixes 2017-05-23 23:34:55 -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