Commit Graph
89 Commits
Author SHA1 Message Date
erwincoumans a38093ad61 deal properly with resize/retina in eglPlugin/eglRendererVisualShapeConverter 2019-02-13 14:43:39 -08:00
Erwin Coumans b257bd731b PyBullet: allow createVisualShape to pass vertices, indices, normals and uv coordinates. This can be combined with changeVisualShape to set the texture. 2019-01-29 12:03:11 -08:00
erwincoumans a6244d714e more PyBullet PhysX preliminary work. 2019-01-25 10:14:54 -08:00
Erwin Coumans 7df6adb9f8 fix compilation, make travis CI happy 2019-01-23 19:58:19 -08:00
erwincoumans 43d3cdfa38 make Travis CI pass 2019-01-23 19:34:21 -08:00
erwincoumans 66f4b276ec fix compile issue 2019-01-23 19:25:12 -08:00
erwincoumans 587500dc16 remove auto (no C++11) 2019-01-23 18:23:09 -08:00
erwincoumans 899e3274e8 fix more compile issues 2019-01-23 17:44:49 -08:00
erwincoumans 5da375b93c Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-01-23 17:35:55 -08:00
erwincoumans e637b24237 remove Rand.* and <random> (no C++11) 2019-01-23 17:35:45 -08:00
Erwin Coumans a174b42c02 fix compile issues 2019-01-23 16:33:06 -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
Erwin Coumans e3c03401c8 PyBullet: fixed a few more file leaks 2018-12-04 19:58:24 +01:00
erwincoumans 69321a9ee6 allow textured cube/sphere from URDF 'box' and 'sphere' visual primitive, when using
texUid = p.loadTexture("tex256.png")
p.changeVisualShape(cube ,-1, textureUniqueId = texUid)
See also https://github.com/bulletphysics/bullet3/issues/2012
2018-11-29 15:41:32 -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 49b098854e PyBullet: avoid calling syncBodies for each DOF in pdControl.
Allow PD_CONTROL in setJointMotorControlArray.
2018-11-07 09:29:19 -08:00
erwincoumans 35790c36c2 fix renamed variable m_rootPath->m_pathPrefix 2018-10-29 10:56:55 -07: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 ee76873689 eglPlugin: remove visual shape for removeBody. 2018-10-28 21:08:57 -07:00
erwincoumans a44df2b0a6 PyBullet: allow to pass vertices (for convex) and vertices+indices (for concave) to createCollisionShape
See createObstacleCourse.py for an example use. At the moment a limit of 1024 vertices and 1024 indices.
Will be lifted once we implement the streaming version (soon).
2018-10-26 10:18:51 -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
Erwin Coumans 9a9386b6a7 allow empty filename in CNS fileIO 2018-10-20 14:16:31 -07:00
erwincoumans 399ff55153 fix typo in previous commit 2018-10-16 19:02:12 -07:00
erwincoumans 8825b39f6c fix potential memory leak in previous commit related to InMemoryFileIO class. 2018-10-16 18:31:17 -07:00
erwincoumans b0a3b1b962 add missing header <string.h> 2018-10-14 15:12:53 -07:00
erwincoumans b5e475aec3 enable planar reflection in MinitaurGymEnv
enable follow cam in other Gym locomotion environments
add testing assets for multi-material obj files -> sdf conversion.
Also use ER_NO_SEGMENTATION_MASK flag for TinyRenderer/EGL plugin renderer
2018-10-14 15:10:19 -07:00
erwincoumans c1e20c448f Implement InMemoryFile for memory caching for fileIO plugin.
Support SDF loading through fileIO plugin.
Replace strcspn by C code (not crossplatform)
Add flag for loadURDF to use color from MTL file (instead from URDF link material)
pybullet.URDF_USE_MATERIAL_COLORS_FROM_MTL and pybullet.URDF_USE_MATERIAL_TRANSPARANCY_FROM_MTL
2018-10-14 12:54:34 -07:00
erwincoumans ad10da57c5 more initial work on fileIOPlugin 2018-10-11 17:00:17 -07:00
erwincoumans a24c1436af state 2 of FileIO plugin: adding/removing FileIO types, search through all registered FileIO types.
(not enabled by default yet)
Example:
fileIO = p.loadPlugin("fileIOPlugin")
print("fileIO=",fileIO)
p.executePluginCommand(fileIO,"e:/develop/bullet3/data/plane.zip", [p.AddFileIOAction,p.ZipFileIO])
p.executePluginCommand(fileIO,"e:/develop/bullet3/data/test2.zip", [p.AddFileIOAction,p.ZipFileIO])
planeId = p.loadURDF("plane.urdf")
duckId = p.loadURDF("duck_vhacd.urdf",[0,0,1])
2018-10-11 14:39:31 -07:00
erwincoumans f792a5951a move zipfFileIO into own header
route loadTextureFile from fileIO plugin
fix B3_ENABLE_FILEIO_PLUGIN logic
2018-10-11 10:58:14 -07:00
Erwin Coumans 74fca2418b fix egl plugin build, with fileIO changes 2018-10-09 08:00:31 -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 2c13e70d1a make projective textures work in DIRECT+eglPlugin (see examples/pybullet/examples/projective_texture.py) 2018-10-05 19:24:44 -07:00
erwincoumans 111ffc784d Use 2560x2048 as default window/framebuffer size for eglPlugin. 2018-10-05 18:28:37 -07:00
erwincoumans 40d7e292f2 fix depth image for eglPlugin, also fix setRGBA color for eglPlugin. 2018-10-05 18:25:51 -07:00
bla 0f8b8388a6 eglPlugin, one more fix, remove graphics instances at resetAll 2018-10-02 08:13:51 -07:00
erwincoumans da37f1d559 add glViewport after call to startRendering (some renderers call glViewport) 2018-10-02 07:49:13 -07:00
bla 7cd962467e fix EGL issue related to glViewport in startRender method 2018-10-01 18:51:02 -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 c1ba89a01c Fix eglPlugin 2018-09-24 08:06:28 -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 64a7a3d82f Merge branch 'master' of https://github.com/erwincoumans/bullet3 2018-09-21 17:33:31 -07:00
erwincoumans 278454ae17 allow to disable self-collision for a link-pair 2018-09-21 17:33:13 -07:00
Erwin Coumans 47efe66017 disable eglPlugin from setup.py / pip pybullet on Windows and Mac (only enable on Linux) 2018-09-21 09:55:57 -07:00
erwincoumans 9553892770 PyBullet / BulletRobotics:
Implement collisionFilterPlugin, use setCollisionFilterPair to enable or disable collision detection between specific pairs of objects.
Also, expose setCollisionFilterGroupMask as PyBullet API and in urdf using the tag <collision group="1" mask="2"/>.
See examples/pybullet/examples/collisionFilter.py for an example.
PyBullet default: Lower the warmstarting factor, for maximal coordinates rigid bodies for more stable simulation.
Add btCollisionWorld::refreshBroadphaseProxy to easier recreate the broadphase proxy without adding/removing objects to the world.
2018-09-12 19:30:49 -07:00
Erwin Coumans 9fa3e44539 fixes related to egl plugin 2018-09-10 23:31:54 -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
Erwin Coumans f26d4fdc4c pybullet eglPlugin: fix Mac OSX build 2018-09-10 08:55:47 -07:00
bla 8f711462e0 fix setup.py to work better on Windows and Linux (with default eglPlugin static built-in,
just use pybullet.loadPlugin("eglRendererPlugin") before loading/creating any objects.
use end/startRendering (swap buffers) before the rendering in the eglPlugin
2018-09-09 22:58:08 -07:00