Commit Graph

310 Commits

Author SHA1 Message Date
erwincoumans
329a1f5a74 PyBullet: move TinyRenderer into a plugin, default statically loaded. You can also dynamically load a render plugin, as shown in renderPlugin.py example. premake has a way to compile the tinyRendererPlugin. 2018-01-17 12:48:48 -08:00
Erwin Coumans
79051b7611 allow to use colors from MJCF file as option (default to random Google colors), use p.loadMJCF(filename, flags=p.URDF_MJCF_COLORS_FROM_FILE
fix quadruped.py example.
add PyBullet.isConnected() API, more friendly than PyBullet.getConnectionInfo()["connected"]
2018-01-11 21:04:08 -08:00
yunfeibai
e3e9546960 Load the deformable object through obj file. Modify the demo for two way coupling between multibody and softbody. 2018-01-07 19:06:09 -08:00
erwincoumans
e0bb359804 report the camera target in the ExampleBrowser StatusBarMessage
(so the parameters reported are compatible with the resetDebugVisualizerCamera API)
2017-12-14 09:36:36 -08:00
erwincoumans
874d764051 add missing file in CMakeLists.txt 2017-11-23 09:32:31 -08:00
erwincoumans
099a6f65f3 tweak zbuffer visualization, show targetpos in example browser 2017-11-18 15:18:46 -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
6a9300809d premake4 add option --enable_static_vr_plugin to statically link the VR sync plugin
fix texture caching from previous commit (what happened there?)
2017-10-25 10:00:45 -07:00
erwincoumans
c155e105a5 unlock thread at exitPhysics
pybullet: don't crash in inverse kinematic if #dofs don't match due to free base
C-API: don't crash if status/statusHandle = 0
2017-10-10 11:10:42 -07:00
erwincoumans
2f2f070ab5 allow changeVisualShape (rgbaColor, specularColor and texture) for maximal coordinates rigid body (btRigidBody)
Make the examples\pybullet\examples\createVisualShape.py a bit more interesting
2017-10-08 11:34:42 -07:00
erwincoumans
cec8da3d85 Implement first draft of pybullet.createVisualShape and add createVisualShape.py example
add normals to duck.obj for nicer appearance
fix plane100.urdf (so collision shape matches visual shape size)
2017-10-07 18:50:23 -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
erwincoumans
9303891468 Allow to configure Y=up, default is Z=up, using pybullet.configureDebugVisualizer(COV_ENABLE_Y_AXIS_UP,0/1)
Implement pybullet.getConnectionInfo, returns [isConnected, connectionMethod], where isConnected=0 or 1
2017-10-05 09:02:33 -07:00
Srajan Garg
05ad68015d add new example for btCompoundShape 2017-10-03 01:38:20 +05:30
Erwin Coumans
3783dccaa3 create a C/C++ plugin system for pybullet / C-API. 2017-09-22 19:17:57 -07:00
Erwin Coumans
ae8f12e8ba more fixes for retina + glfw + opengl2 fallback 2017-09-20 13:09:18 -07:00
erwincoumans
1881f6679a fix issue with rendering of certain capsules from MJCF files. 2017-09-15 15:38:24 -07:00
Erwin Coumans
6942a9f8ef remove a debug printf 2017-09-13 13:48:37 -07:00
Erwin Coumans
340a8f4704 add sigaction handler to Example Browser, to always shutdown shared memory
make GUI_SERVER more reliable
next attempt to connect to SHARED_MEMORY in Gym envs, if available, before DIRECT/GUI
allow software rendering fallback, even if ER_BULLET_HARDWARE_OPENGL is chosen in getCameraImage
2017-09-13 13:30:16 -07:00
Erwin Coumans
416c29daf7 fix with shared memory connection while disabling rendering 2017-09-11 09:30:39 -07:00
Erwin Coumans
a985d441bd Re-enable Physics Server (Logging) and Physics Server (Replay Log) 2017-09-04 19:00:50 -07:00
erwincoumans
eb97e06280 fix minitaur.urdf: move lower-leg inertia to center, add missing collision for one of the motors, add contact parameters for friction_anchor, spinning friction, compliance (stiffness/damping)
fix in indexing for maximal coordinates (unused by default, still experimental, requires many iterations for Minitaur due to extreme mass-ratio, hence use of reduces/generalized coordinates)
modify quadruped.py to test maximal coordinates
wrap angular servo (positional) target within [-PI,PI] in btGeneric6DofSpring2Constraint
add 'j' key to show body frames in wireframe/debug mode
2017-09-02 01:05:42 -07:00
Erwin Coumans
9d404f5316 bump up pybullet version, pre-sort visual shapes 2017-08-29 21:36:56 -07:00
erwincoumans
4ff6befc6d avoid flickering in visualizer window, when doing pybullet.getCameraImage 2017-08-29 12:13:21 -07:00
Erwin Coumans
226aaedc46 bump up pybullet setup.py version, make B3_NO_PYTHON_FRAMEWORK default on Mac
minor fixes (arg name in header/cpp the same)
2017-08-18 08:53:46 -07:00
Erwin Coumans
60b60ef9fd add pybullet.connect(pybullet.GUI_SERVER) option. This allows shared memory connections, acting as a physics server. You can connect using SHARED_MEMORY to this GUI_SERVER. 2017-08-14 17:02:20 -07:00
Erwin Coumans
0df8887990 improve pybullet performance of loadURDF/SDF/MJCF and 'createCollisionShape'/'createMultiBody' for GUI/VR/SHARED_MEMORY,
use p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) before loading and
p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,1) afterwards
2017-07-14 23:12:16 +01:00
Erwin Coumans
9cf747b35b a few compile/warning fixes 2017-07-01 10:01:55 -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
Erwin Coumans
9213f944f1 add kukaCamGymEnv.py with camera observations (preliminary)
show camera position in example browser
disable per-vertex and per-fragment profile timings
2017-06-21 09:33:46 -07:00
Erwin Coumans
2e6f8c271e allow to disable/enable default keyboard shortcuts ('w', 'd' 's' etc) and default mouse picking
pybullet.getMouseEvents / b3RequestMouseEventsCommandInit
2017-06-17 13:29:14 -07:00
erwincoumans
69642805ff Merge pull request #1166 from erwincoumans/master
btThreadsAreRunning wasn't defined if BT_THREADSAFE was not defined, …
2017-06-04 22:53:11 -07:00
Erwin Coumans
a7aed37632 work on pybullet/C-API createMultiBody (still preliminary, only sphere/box collision shapes, no links/hierarchies yet, soon)
pybullet/C-API, expose linear/angular damping
fix some warnings (param name needs to be same in .h and .cpp)
fix potential startup threading issue (args were deleted in main thread while still possibly use in child thread)
fix for spinning/rolling friction in case of mixing maximal and reduced coordinate btMultiBody+btRigidBody
2017-06-04 22:04:16 -07:00
Lunkhound
03aa178ca5 example browser: fix 'clamp-to-integer' on GUI-sliders 2017-06-04 17:34:21 -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
erwincoumans
518c7ec00e Merge pull request #1144 from lunkhound/pr-threading-refactor
Bullet 2 threading refactor: moved parallel-for calls into core libs
2017-06-02 16:18:12 -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
Lunkhound
cc1e6dc269 make MultiThreadedDemo available if threadsafe 2017-05-30 00:47:41 -07:00
Lunkhound
a6a0ea5f54 add task scheduler implemented with thread support interface 2017-05-30 00:21:10 -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
Lunkhound
dfe184e8d3 Bullet 2 threading refactor: moved parallel-for calls into core libs 2017-05-23 01:01:20 -07:00
Erwin Coumans
b19c209dbc The softbody/bunny test is very experimental and shouldn't be enabled in the example browser, unless USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD is defined. I fixed a few bugs that cause the hang. 2017-05-21 06:50:53 -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
11fa56513b initialize alpha component of color 2017-05-14 21:14:56 -07:00
Erwin Coumans
e954374e56 build system fixes 2017-05-13 13:50:35 -07:00
Erwin Coumans
f80838e989 expose the changeVisualShape RGBA color for TinyRenderer, OpenGL3 renderer. 2017-05-13 09:18:36 -07:00