Commit Graph

92 Commits

Author SHA1 Message Date
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
84d09cc18f Split CommonGfxVertex3D into two different ones, GfxVertexFormat0 and GfxVertexFormat1
Rewrite  GLInstancingRenderer::drawTexturedTriangleMesh
2017-05-24 13:05:16 -07:00
Erwin Coumans
df1b5b6ca5 fix shader issue 2017-05-23 23:17:57 -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
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
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
Erwin Coumans
bdf366b045 implement pybullet.getDebugVisualizerCamera, width, height, providing viewmatrix, projection matrix 2017-04-10 11:03:41 -07:00
yunfeibai
c92fd6120d EGL OpenGL window. 2017-02-06 16:22:17 -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
erwincoumans
9708392322 work-in-progress
add UDP network connection for physics client <-> server.
also set spinning friction in rolling friction demo (otherwise objects may keep on spinning forever)
2016-11-04 13:15:10 -07:00
erwin coumans
29f3afe2a4 don't use GL_LINEAR_MIPMAP_LINEAR for shadow maps
optimize gpu upload (use glBufferSubData instead of glMapBuffer
Avoid checking char array against zero.
2016-10-14 15:06:09 -07:00
erwincoumans
33d9603e16 Add rudimentary 'saveWorld' command in shared memory API and pybullet, see examples/pybullet/saveWorld.py
Use trilinear filtering instead of bilinear
2016-10-12 23:03:36 -07:00
erwin coumans
32eccdff61 Create project file for BussIK inverse kinematics library (premake, cmake)
URDF/SDF: add a flag to force concave mesh collisiofor static objects. <collision concave="yes" name="pod_collision">
VR: support teleporting using buttong, allow multiple controllers to be used, fast wireframe rendering,
Turn off warnings about deprecated C routine in btScalar.h/b3Scalar.h
Add a dummy return to stop a warning
Expose defaultContactERP in shared memory api/pybullet.
First start to expose IK in shared memory api/pybullet (not working yet)
2016-09-08 15:15:58 -07:00
erwin coumans
de5d1b5cfc make husky wheels soft/compliant
reduce shadow size to make VR on older GPU (Mac Pro 2013) perform more smooth
less sleep in physics thread.
2016-09-03 08:39:40 -07:00
erwin coumans
c28cd03fbd OpenVR controller can pick/drag objects. Instructions, Windows only:
Compile using premake+visual studio, and compile App_SharedMemoryPhysics_VR
Compile pybullet using cmake using cmake -DBUILD_PYBULLET=OFF -DCMAKE_BUILD_TYPE=Release ..
Create a symbolic link from c:\python\dlls\pybullet.pyd to C:\develop\bullet3\cmp\lib\Release\pybullet.dll
App_SharedMemoryPhysics_VR
Run Python. Here are some Python lines to get going:
import pybullet as p
p.connect(p.SHARED_MEMORY)
p.loadURDF("cube.urdf")
p.setGravity(0,0,-10)
p.setRealTimeSimulation(1)

Allow real-time simulation in physics server, add pybullet command setRealTimeSimulation to control it
Mesh decimation (reduce number of triangles/vertices) using a Blender modifier for Kuka IIWA and Husky
Disabled the 'glFlush' commands in GLInstancingRenderer.
Add VR controller methods to examples\CommonInterfaces\CommonExampleInterface.h
Use the ANSI version in Windows file/string operations instead of unicode, hope this doesn't break builds.
2016-07-17 23:50:11 -07:00
Erwin Coumans
34187fba1c fix camera update issue in previous commit
fix Mac OSX build issue
2016-07-14 09:49:49 -07:00
erwin coumans
4a705d1e03 Add kiva_shelf to prepare for picking/grasping task
Fix uninitialized variable jointDamping/jointFriction in SDF importer
Add SDF <pose> parsing in visual, inertial, collision elements.
Slight improvement in TinyRender loading performance of largish meshes (30k vertices)
Reduce #define MAX_SDF_BODIES to 500, due to some issue in client code, todo: figure out what the issue is.
b3RobotSimAPI support SDF file loading
Tiny improvement in OpenGL hardware renderer lighting, to distinguish faces without textures
2016-07-14 00:05:57 -07:00
Erwin Coumans
10cc6f14cb add option to use hardware OpenGL renderer for synthetic camera 2016-07-12 18:16:13 -07:00
erwin coumans
02582e3a78 shrink down cube size of BasicDemo 10 times (it looked ginormous in VR) from 2x2x2 meter to 0.2
add test for VR HUD/sub-titles
fix issue in previous commit, partial string use %.8s not %8.s
use long long int in b3Clock
fix warning/error in pointer alignment in serialization
Fix pybullet Windows compilation.
(thanks to bkeys/https://github.com/bulletphysics/bullet3/pull/687)
2016-07-09 15:09:09 -07:00
erwin coumans
60d2b99151 Physics runs in a separate thread from rendering in PhysicsServerExample (preliminary)
Improve rendering performance. OpenVR experience is smooth now.
commit needs a bit more testing before pushing in main repo.
2016-07-07 19:24:44 -07:00
erwin coumans
58206b7962 Add preliminary support for VR/OpenVR for HTC Vive and Oculus Rift,
(Windows-only first, later Linux and OSX)
Use premake to build, use --enable_openvr flag
2016-06-30 16:03:38 -07:00
erwin coumans
14aa666c6f preparation to receive camera image data from physics server
increase shadowmap world size default to 50 units (meter), 10 units (meter) was too small for most examples.
2016-05-31 10:23:04 -07:00
Erwin Coumans
aa9a276a71 fix typo in texels flip
add support to create a cube in TinyRenderer (quick test)
2016-04-28 23:01:49 -07:00
erwin coumans
03bdcc8737 patch TinyRenderer so it software-renders in an OpenGL texture, for testing
fix texture support: flip texture to make OpenGL happy (lower-left is origin)
add path prefix to .obj loader, so materials/textures are loaded ok.
2016-04-26 20:52:52 -07:00
Erwin Coumans
4e61f0cab9 add function to CommonRenderInterface to update/activate a texture
add example how to render a texture 2d quad in SimpleOpenGL3
2016-04-20 12:55:21 -07:00
erwincoumans
d6464ce40d add 'replay' command log feature: no mouse interaction during replay, and use a fixed number of sim steps in stepSimulation.
workaround for reversed separating normal in gjk/epa when using very small shapes, detect case and revert normal.
use smaller world size (10 units versus 100) for higher resolution shadow map
use a hard-coded rolling friction of 0.2 for objects in physics server (will make this configurable)
fix loading of command log files, when platform features are different (64bit/32bit)
2015-11-01 12:48:15 -08:00
erwin coumans
7ac497d6f2 WIP example for real-time collision detection features of Bullet 2015-10-18 14:01:25 -07:00
=
3d10338ed5 fix warnings (thanks to Aaron!) 2015-09-10 17:52:41 -07:00
Erwin Coumans
f89d587a02 update tutorial for SIGGRAPH course
allow multiple graphing windows at the same time
2015-08-10 14:30:00 -07:00
erwin coumans
a5669d2ffd add a textured sphere8.obj test with obj loader
fix shaders, so that shadowed and non-shadowed are matching
fix registerGraphicsUnitSphereShape API (level of detail), support textured sphere too
add support for textured cube
add start for a Tutorial.cpp
2015-08-05 19:03:27 -07:00
Erwin Coumans
26531f3fbc fix some warnings, disable gimpact by default in world importer,
use DIRECTLY_UPDATE_VELOCITY_DURING_SOLVER_ITERATIONS by default for now,
until we find the issue with some failing test cases in btMultiBody
fix a crashing issue in MyMultiBodyCreator.cpp (uninitialized variable)
disable excessive debug printf in URDF2Bullet
2015-07-27 13:28:47 -07:00
erwincoumans
6c9ce344ea fix shadowmap crash on some Intel GPUs, see https://github.com/bulletphysics/bullet3/issues/4
remove targetdir from all libraries in premake, so it is much easier to create a separate folder for all binary+lib
transmit the serialized btMultiBody data back from server to client, after the server loads a URDF file. This includes base+link+joint names
tweak the serialization routines, so it is easier to skip pointers and to serialize directly to a shared memory buffer
also tweak the serialization code to allow to process data without 'DNA' schema data (assuming file-DNA = memory DNA)
2015-07-10 22:20:06 -07:00
Erwin Coumans
0da584a42d allow to compile and run the ExampleBrowser on older Mac OSX versions (without OpenGL3)
using the 'NO_OPENGL3' preprocessor definition
both premake/cmake has support for this now
needs some testing
2015-05-06 10:35:14 -07:00
erwincoumans
218e9f9bf9 enable URDF loading throught the 'File/Open' menu
set a default camera targets for each demo. note that it is only reset when switching to a different demo, so you can restart at your chosen location.
no OpenCL pairbench drawing in OpenGL2 (there is no VBO available etc)
2015-05-01 11:42:14 -07:00
erwincoumans
57d8567ca3 more example refactoring 2015-04-16 15:16:13 -07:00
erwincoumans
a1bf9c5556 add initial examples, replacing the 'Demos/Demos3'. Will make it work cross-platform, OpenGL3/OpenGL2 and add more examples to it. 2015-04-16 09:55:32 -07:00