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
erwincoumans
ffc808784b
PyBullet: add planar reflection example,
...
See examples/pybullet/examples/addPlanarReflection.py
2018-04-11 01:03:36 -07:00
YunfeiBai
b032a1fd60
Update the projective texture shader to solve the texture interpolation artifact.
2018-04-09 17:15:42 -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
yunfeibai
fd7aa8d0e1
Expose using projective texture as a flag in pybullet getCameraImage API.
2018-03-18 17:01:23 -07:00
erwincoumans
94bc897067
Merge pull request #1574 from erwincoumans/master
...
fix glx include
2018-02-22 09:41:01 -08:00
Erwin Coumans
05b02d6b3e
fix glx include
2018-02-22 09:08:10 -08: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
erwincoumans
3508a4523b
Merge pull request #1560 from YunfeiBai/master
...
Add shader and example for projective texture.
2018-02-21 10:23:18 -08:00
erwincoumans
0e0b7cb9f8
glew->glad
2018-02-21 08:59:06 -08:00
Erwin Coumans
9288ea9c6a
fix mac osx build
2018-02-21 08:16:00 -08:00
Erwin Coumans
c2b59776ed
CMakeLists glew to glad
2018-02-20 21:09:31 -08:00
Erwin Coumans
dacafda88a
use glad instead of glew in mac build and pybullet setup.py
2018-02-20 20:09:12 -08:00
Erwin Coumans
b0984de046
preparation to replace glew by glad
2018-02-20 19:44:02 -08:00
yunfeibai
5494aa72fa
Set the perspective projection for projective texture mapping. Change the demo to two bears with the same view projection matrix for the camera and the projector.
2018-02-20 18:32:09 -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
01f58f8f02
PyBullet: soft bodies are rendered, so we don't need to also render wireframes in regular mode.
...
Use glBufferSubData instead of glMapBuffer/glUnmapBuffer, much faster soft body vertex sync.
Don't use a separate btSoftBodyWorldInfo, use the existing one in btSoftMultiBodyDynamicsWorld.
2018-02-18 11:09:42 -08:00
yunfeibai
fb6907aa1b
Merge remote-tracking branch 'upstream/master'
2018-02-15 18:19:29 -08:00
yunfeibai
36dcabbaf5
Merge remote-tracking branch 'upstream/master'
2018-02-15 14:31:34 -08:00
yunfeibai
cf4a0a3503
Add improvement/fix in SortableTransparentInstance back.
2018-02-15 13:19:41 -08:00
yunfeibai
7dbc5626fb
Add the shader files.
2018-02-12 18:19:05 -08:00
yunfeibai
2947cd54ce
Add shader for projective texture.
2018-02-11 21:29:02 -08:00
yunfeibai
08548e1ef0
Add example for projective texture.
2018-02-11 13:50:45 -08:00
Erwin Coumans
508550c5e9
fix premake build for linux, thanks to @consultit
...
See also issue #1538
2018-02-09 18:46:26 -08:00
Erwin Coumans
dcdec2236f
PyBullet/rendering: improve sorting of transparent objects
2018-02-05 23:48:39 -08:00
erwincoumans
13d67e8fc3
add bicycle resources and testBike.py script (use python -m pybullet_envs.examples.testBike after pip install pybullet)
...
center shadow around camera target
2018-01-31 22:17:15 -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
d3x0r
8e75d4375b
Fix missing DWORD variable (lost in merge port)
2017-10-28 14:50:44 -07:00
d3x0r
88b49947b5
Composite of fixed code for mingw64(on windows) and general fixes for msvc.
...
1) (win32window) don't convert char to wide, use char direct to window.
2) (CMakeLists) Don't link one library as static CPPLIB and no others (mismatched allocations)
3) (macros) Fix Gwen macros for mingw64 on windows build. (changes are by compiler(msc_ver) not platform)
4) (FileUtils) sprintf_s reference by platform, not compiler (mingw64 support)
5) (b3OpenCLUtils) fix bad define name _MSVC_VER->_MSC_VER
6) (compoundCollision) remove unused variables, simplify operation.
7) (impulseconstraint) remove duplicated code block
2017-10-28 14:42:38 -07: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
Erwin Coumans
26d32f2aa8
improve loading performance of large textures:
...
option to disable tinyrenderer, use p.configureDebugVisualizer(p.COV_ENABLE_TINY_RENDERER,0)
also make sure to use p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) before loadURDF, and enable rendering afterwards using p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,1)
reorder 2 loops, making the flip texels twice as fast (cache coherency),
single memcpy of entire texture in tinyrenderer, instead of per-pixel copy (memory layout is the same)
add lots of B3_PROFILE timings, to see where time is going
2017-10-06 13:46:24 -07:00
erwincoumans
e0dbd25cb7
remove some unneeded/debug BT_PROFILE markers
2017-09-29 07:50:48 -07:00
erwincoumans
6d68a67c79
fix a bug in a changeVisualShape/texture selection, out-of-bounds check was using the wrong array.
...
May fix some internal texture mug bug.
2017-09-25 11:11:48 -07:00
Erwin Coumans
ae8f12e8ba
more fixes for retina + glfw + opengl2 fallback
2017-09-20 13:09:18 -07:00
Erwin Coumans
fb05763093
support retina / scale factor between pixel size and screen coordinate size
2017-09-20 10:07:18 -07:00
Erwin Coumans
3e0b72b632
allow to configure glfw on Mac OSX, disabled by default
2017-09-20 08:12:59 -07:00
erwincoumans
b079277d51
minor fixes in GLFWOpenGLWindow
2017-09-19 21:40:17 -07:00
erwincoumans
cadce37141
add GLFWOpenGLWindow and glad (replacement for glew)
2017-09-19 21:16:24 -07: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
erwincoumans
cc9995d44b
fix uninitialized camera position in 'VR' / 'camera rendering' mode (causing broken specular reflections in VR)
...
use debug visualizer camera viewmatrix/projection matrix if not provided, in ER_BULLET_HARDWARE_OPENGL mode.
fix broken changeRGBAColor implementation, thanks to Laura for the report!
2017-09-12 22:14:00 -07:00
Erwin Coumans
ee082396d1
fixes in libdl/DL cmake
...
minor tweaks in pybullet OpenAI gym locomotion envs (connect to shared memory before going GUI/DIRECT)
bump up pybullet version to 1.3.6
2017-09-10 16:22:45 -07:00
Erwin Coumans
c895bd244f
track down DL/dl issue
2017-09-09 13:05:45 -07:00
Jonathan Tompson
29acd99d25
changed exit(0) to exit(EXIT_FAILURE) for OpenGLWindow functions, and changed printf to fprintf(stderr for error string printing.
2017-08-24 15:18:43 -07:00
Erwin Coumans
c06ea72a4c
improve the new pybullet gym environments, follow camera, disable 2D GUI, disable rendering during loading (makes it faster)
...
disable vsync on Mac
fix setup.py file
2017-08-20 18:11:53 -07:00
Erwin Coumans
9cf747b35b
a few compile/warning fixes
2017-07-01 10:01:55 -07:00
Erwin Coumans
c17625a4d0
texture check fix
2017-07-01 09:15:00 -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
d5fe67cf57
Add pybullet transparent.py example, transparency with global per-object sort in GLInstancingRenderer
2017-06-24 19:38:31 -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
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
yunfeibai
bfcbb339cf
Merge remote-tracking branch 'upstream/master'
2017-06-02 18:26:04 -07:00
Erwin Coumans
030d723db6
fix some warnings
2017-06-01 16:48:07 -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
5c6045b61f
turn down effect of default specular a bit
2017-06-01 13:15:58 -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
Erwin Coumans
3157093125
Implemented specular reflective lighting for OpenGL 3.x, everything looks shiny (will add APIs to make it less shiny ;-)
...
Remove roof from kitchens/1.sdf, otherwise shadows and shinyness won't work (light is outside the room, bouncing against roof-top)
Make kuka_iiwa/model.urdf more smooth, use .obj for per-vertex normals (using Blender, import STL, export OBJ, enable triangles, normals and Z-UP, Y forward)
2017-05-31 20:32:45 -07:00
erwincoumans
4e03c36fa6
add pybullet.multiplyTransforms and pybullet.invertTransform
...
use btAssert instead of assert (glGetError is really slow)
shift default light-position a little bit, to make faces different color
2017-05-29 21:55:58 -07:00
Erwin Coumans
e023c012b4
TinyRendererVisualShapeConverter set near/far for its own camera.
2017-05-25 13:39:36 -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
df1b5b6ca5
fix shader issue
2017-05-23 23:17:57 -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
433d11d8cf
Add a btIDEbugDraw::clearLines, helps multi-threaded rendering of lines (while updating those lines in a dynamics world in a different thread)
...
Expose COV_ENABLE_VR_RENDER_CONTROLLERS, to enable/disable rendering of controllers (and some frames) in VR
Expose COV_ENABLE_RENDERING to enable/disable rendering.
Fix some multi-threading issues (potential crashes), related to debug drawing/rendering in one thread, while changing the dynamics world/removing/resetSimulation in a different thread.
2017-05-16 12:19:03 -07:00
Erwin Coumans
a554c250a7
GLInstancingRenderer: don't crash but assert/return -1, if the # vertices exceeds the maximum capacity.
2017-05-15 09:02:49 -07:00
Erwin Coumans
f80838e989
expose the changeVisualShape RGBA color for TinyRenderer, OpenGL3 renderer.
2017-05-13 09:18:36 -07:00
Erwin Coumans
7cb763e4c8
don't render objects with zero alpha color (RGBA)
2017-05-13 07:38:00 -07:00
Erwin Coumans
b22ffcf61c
Use more googley colors in the examples.
...
Add high-resolution textured sphere, and automatically convert sphere, capsule and multi-sphere shape to use this, with caching to avoid duplicates.
2017-05-11 22:59:27 -07:00
Erwin Coumans
a86f584824
more work towards removeBody for C-API/pybullet, work-in-progress.
2017-05-03 21:53:29 -07:00
Erwin Coumans
152e3da3e4
Implementation of virtual void CommonRenderInterface::removeGraphicsInstance(int instanceUid)
...
for GLInstancingRenderer (OpenGL3+) and SimpleOpenGL2Renderer (OpenGL2)
Refactored the add/remove object pool in Bullet3Common/b3ResizablePool.h
Added CommonRigidBodyBase::deleteRigidBody, also removing its graphics instance.
2017-05-03 17:05:05 -07:00
Erwin Coumans
eaa6255e06
Merge branch 'master' of https://github.com/erwincoumans/bullet3
2017-04-26 21:33:19 -07:00
Erwin Coumans
943dd16e78
disable keyboard repeat on Windows
...
add some TinyAudio classes to play wav, mostly from Stk (http://github.com/thestk/stk )
2017-04-26 21:31:01 -07:00
Erwin Coumans
552c85617f
fix compile issue
2017-04-23 17:12:40 -07:00
Erwin Coumans
4759e5a590
tinyrenderer: disable triangle backface culling (doesn't work well, cull triangles that should be visible)
...
GLInstancingRenderer: allow to set the light position
2017-04-23 07:35:13 -07:00
David Carlier
756568ad9c
build fix for BSD systems
2017-04-16 17:53:44 +01:00
Erwin Coumans
f73b54e4ab
testing ImGUI
2017-04-11 20:16:49 -07:00
Erwin Coumans
bdf366b045
implement pybullet.getDebugVisualizerCamera, width, height, providing viewmatrix, projection matrix
2017-04-10 11:03:41 -07:00
erwincoumans
e1874c6b54
Update MacOpenGLWindow.cpp
2017-04-06 22:41:04 -07:00
Erwin Coumans
e487bc360b
add support for setuptools setup.py pybullet for 'pip install pybullet'
...
rewrite MacOpenGLWindow.mm into .m version, so that setup.py can handle it.
See also test at https://pypi.python.org/pypi/pybullet/0.1.0
2017-04-02 23:00:06 -07:00
Erwin Coumans
2211a20ab6
remove 20 second time limit for ffmpeg
2017-03-30 12:38:13 -07:00
Erwin Coumans
fffa17dd35
little tuning for rendering
2017-03-28 08:20:10 -07:00
Erwin Coumans
46c5b00964
report actual number of instances (enable sync transforms for physics server)
2017-03-27 23:09:24 -07:00
Erwin Coumans
b9642e8e68
enable base OpenGL2 rendering as fallback for more demos including physics server (use --opengl2 flag in Example Browser), no shadows yet.
2017-03-27 21:42:37 -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
34fc2fb589
create premake/cmake file for Bullet/Extras/obj2sdf
...
add missing 1.sdf for Bullet/data/kitchens/1.sdf
add support for getting keyboard events (pybullet.getKeyboardEvents and b3RobotSimulatorClientAPI::getKeyboardEvents)
2017-03-02 12:33:22 -08:00
Erwin Coumans
8f546acbe8
disable keyboard toggle in Linux/X11
...
revert num solver iterations to 50 (from 150)
set solver iterations for one gripper grasp to 150
2017-02-16 15:56:42 -08: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
ce69f27f32
Modify the depth buffer value in TinyRenderer to be consistent as in OpenGL.
2017-02-08 11:34:38 -08:00
yunfeibai
c92fd6120d
EGL OpenGL window.
2017-02-06 16:22:17 -08:00
Erwin Coumans
73e83d6e84
fix OSX build, fix some warnings
2017-01-22 21:06:51 -08:00
Erwin Coumans
cf9f022d39
[pybullet] getNumConstraints, getConstraintInfo APIs.
...
[pybullet] updated pybullet_quickstartguide.pdf
Fail clearly (assert, return BT_INFINITY) if link index is out of range for btMultiBody methods localPosToWorld,worldPosToLocal,localDirToWorld,worldDirToLocal.
pybullet getConstraintInfo
Fix warnings due to Mac OSX 10.12 upgrade (with backward compatibility)
2017-01-22 19:08:31 -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
c0c4c8ba3f
fix many warnings
...
remove btMultiSapBroadphase.*
make collisionFilterGroup/collisionFilterMark int (instead of short int)
2017-01-15 22:26:11 -08:00