Commit Graph

139 Commits

Author SHA1 Message Date
erwin coumans
e952ac6f63 Add pybullet.configureDebugVisualizer(rgbBackground=[red,green,blue]) (each component a float in the range [0,1])
This is an alternative to passing options="--background_color_red=red --background_color_green=green --background_color_blue=blue" in the connect method.
2021-05-06 18:08:22 -07:00
Erwin Coumans
375d7097e4 don't postpone release for remote visualizer (otherwise it blocks forever) 2020-12-23 10:42:25 -08:00
Erwin Coumans
1bd82e7d81 allow rendering of (textured) heightfield in TinyRenderer and EGL.
Also update normals, if heightfield is updated.
2020-09-20 16:03:56 -07:00
Erwin Coumans
1452cae641 * add textured models of ball.vtk (obj/mtl) and torus (obj/mtl) and cloth.
1) allow to render deformables in 'getCameraImage', for TinyRenderer (tested OK) and EGL (untested)
2) allow to have textures for deformables. See deformable_ball.py, deformable_anchor.py and deformable_torus.py for examples
3) deformables: allow to request simulation mesh data (even if there is a render mesh) See deformable_anchor.py for an example usage
   data = p.getMeshData(clothId, -1, flags=p.MESH_DATA_SIMULATION_MESH)
4) fix deletion of deformables, thanks to Fychuyan, https://github.com/bulletphysics/bullet3/pull/3048
5) allow to enable and disable double-sided rendering, p.changeVisualShape(objectUid, linkIndex, flags=p.VISUAL_SHAPE_DOUBLE_SIDED)
6) fix GripperGraspExample, model not found
7) Fix deformable anchor not attaching to multibody with object unique id of 0
8) Fix issue with assignment of unique ids in TinyRenderer/EGL renderer (always use broadphase uid)
9) Avoid crash/issue of simulation with pinned vertices (mass 0) in btDeformableBackwardEulerObjective::applyExplicitForce
10) Store uv/normal in btSoftBody::RenderNode to allow textured meshes
11) (uncomment in btSoftBodyHelpers.cpp): dump vertices and indices in obj wavefront format, when loading a VTK file, for quicker creation of a (textured) surface mesh
12) allow interpolateRenderMesh also for old position-based soft bodies (not only the shiny new FEM deformables)
13) fix a few premake targets
14) update build_visual_studio_vr_pybullet_double_cmake.bat so it suits c:\python37 and installs locally
    for local install of Bullet, see also this example https://github.com/erwincoumans/hello_bullet_cmake
2020-09-12 01:03:04 -07:00
Erwin Coumans
ccdec68b1d expose shadowmap intensity to PyBullet API 2020-09-07 16:52:14 -07:00
Xuchen Han
bf8cf19665 support implicit integration in picking force 2020-06-24 17:48:43 -07:00
Erwin Coumans
754dbd5fda add pybullet.unsupportedChangeScaling feature for some small experiments, this is not general and has many limitations that are not likely are going to be resolved,
so unless it does what you want, ignore this api, it is unsupported!
2020-05-17 13:46:11 -07:00
Xuchen Han
b3e23cfaa4 parameter tuning for new solver 2020-04-15 14:49:07 -07:00
Erwin Coumans
27fbbfee7f pybullet removeAllParameters (sliders, buttons)
pybullet addUserDebugParameter adds button instead of slider, if min > max.
2020-03-16 21:29:30 -07:00
Xuchen Han
0a66818841 Use latest mouse position for picking force 2020-03-13 14:52:13 -07:00
Xuchen Han
4730dab4bb Address PR comments 2020-03-13 14:52:13 -07:00
Xuchen Han
7dfef92267 Add support for picking deformable with mouse 2020-03-09 11:19:08 -07:00
Xuchen Han
ec0e9892b5 add slider demo 2020-03-06 16:04:34 -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
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