Commit Graph

524 Commits

Author SHA1 Message Date
erwincoumans
49a2771522 Implement the pybullet/Python equivalent of vr_kuka_setup_vrSyncPlugin.py
In vr_kuka_setup_vrSyncPython.py, the vr controller is synced in Python, introducing a small lag
Invr_kuka_setup_vrSyncPlugin.py, the vr controller is synced in C++ at the same frequency as the physics time step (240 Hz by default)
2017-10-09 10:52:25 -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
b2edd81ef6 touch up createVisualShape.py example 2017-10-07 19:00:44 -07:00
erwincoumans
3826dddc83 fix asset paths, createVisualShape.py and duck.obj 2017-10-07 18:52:22 -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
Erwin Coumans
127982ab88 fix more bugs, introduced in previous recent commits 2017-10-06 16:00:33 -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
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
822ff077c7 expose some parameters through pybullet.getPhysicsEngineParameters (C-API: b3InitRequestPhysicsParamCommand + b3GetStatusPhysicsSimulationParameters) 2017-10-05 11:43:14 -07:00
erwincoumans
1262adeaec build a named tuple for 'getConnectionInfo'
remove debug code
2017-10-05 09:57:17 -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
erwincoumans
a2d6a2e822 Merge pull request #1350 from bingjeff/add_mass_matrix
[pybullet] Add calculateMassMatrix.
2017-10-05 07:45:30 -07:00
erwincoumans
05b71a521d update unity3d/examples/NewBehaviourScript.cs to load a plane and cube, synchronize the world transform
added debug rendering from CjLib (with DrawLine from my fork here: https://github.com/erwincoumans/unity-cj-lib)
2017-10-04 12:21:52 -07:00
erwincoumans
1b03871b4d use explicit size for name, to avoid issue converting/marshalling data to C#
example to call b3VisualShapeInformation from C# and marshall b3VisualShapeData (after loadURDF)
See examples\pybullet\unity3d\examples\NewBehaviourScript.cs
2017-10-03 18:01:53 -07:00
Erwin Coumans
acbe457d31 add option to statically link a plugin, select the postFix (to avoid naming conflict of multiple plugins functions ('initPlugin' becomes initPlugin_postFix)
pass events (keyboard, mouse, vr controllers etc) to the plugin, and clear them after the tick callback, so that it doesn't interfere with Python 'getEvents'
2017-10-03 15:00:52 -07:00
Erwin Coumans
cd88614a22 search for the controller, instead of using a hard-coded number. 2017-10-02 12:22:46 -07:00
Jeffrey Bingham
e04820af73 Add calculateMassMatrix to pybullet.c 2017-09-30 20:39:56 -07:00
erwincoumans
a632b6c6a4 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-09-29 08:01:11 -07:00
erwincoumans
dd2c7af2b2 Update pybullet autogenerated C# bindings, with very basic example script that runs inside Unity 3D 2017-09-29 07:47:31 -07:00
Erwin Coumans
0948ce5984 import missing functools 2017-09-28 10:42:02 -07:00
Erwin Coumans
345836d670 revert to original agents train/visualize scripts, but using pybullet envs in configs.py (agents lacks a convenient way to extend environments) 2017-09-28 10:19:41 -07:00
Jeffrey Bingham
cd231c030e more formatting. 2017-09-27 22:35:02 -07:00
Jeffrey Bingham
d8b80bce40 Fix the translation jacobian. 2017-09-27 22:25:39 -07:00
Jeffrey Bingham
6da931d0bd Adjust jacobian.py to show mismatch between joint state and link state. 2017-09-27 22:25:39 -07:00
Jeffrey Bingham
0b239e8bc0 [pybullet] Add an example for jacobian. 2017-09-27 22:25:39 -07:00
yunfeibai
54eada7579 Fix memory leak. 2017-09-27 16:42:29 -07:00
yunfeibai
85be3b43dd Merge remote-tracking branch 'upstream/master' 2017-09-27 15:20:11 -07:00
yunfeibai
113e103bc2 Modify the joint damping input check, and output error message when it doesn't pass the size check. Modify the kuka grasping example accordingly. Setting joint damping in this example was a no-op before. 2017-09-27 15:18:08 -07:00
yunfeibai
adcece7927 Adjust the IK setup to address the inverse kinematics issues mentioned in #1249. 2017-09-27 14:14:57 -07:00
Erwin Coumans
4dca5b3ef5 fix typos in agents config 2017-09-27 12:17:59 -07:00
Erwin Coumans
a716752915 add __init__.py file in agents folder 2017-09-27 10:30:05 -07:00
Erwin Coumans
5082d6af15 bump up pybullet version, instruction to visualize agents ppo:
python -m pybullet_envs.agents.visualize_ppo -config=pybullet_pendulum --logdir=pendulum/20170927T101514-pybullet_pendulum/ --outdir=vid

tensorboard --logdir=20170927T101514-pybullet_pendulum --port=2222
2017-09-27 10:26:45 -07:00
Erwin Coumans
e4a3b3fe38 add TensorFlow Agents PPO training script for various pybullet environments:
example:

python -m pybullet_envs.agents.train_ppo --config=pybullet_pendulum --logdir=pendulum
2017-09-27 10:20:38 -07:00
Erwin Coumans
c37919604f add minitaur environment randomizer, enable it by default
this improves PPO training ( more stable)
2017-09-27 09:07:21 -07:00
erwincoumans
12f28c5f76 fix compile issue on MSVC 2017-09-26 19:58:24 -07:00
erwincoumans
e72ebc95de Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-09-26 19:54:57 -07:00
erwincoumans
8a265b8af2 expose gear erp/relative position target to C-API/pybullet
finish much better C++ vrSyncPlugin, running in-the-loop with the physics at high frequency, see also vr_kuka_setup_vrSyncPlugin.py
2017-09-26 19:54:36 -07:00
Erwin Coumans
b03e5dec5f return -1 for debugDrawItems in DIRECT mode, instead of failing the API 2017-09-26 11:40:38 -07:00
erwincoumans
b1f8eb74a4 bump up shared memory version number
add option to recompute forward kinematics, to be consistent with link velocities in pybullet.getLinkState (..., computeForwardKinematics=0/1), thanks to Jeff Bingham for bringing up this inconsistency
2017-09-26 10:05:17 -07:00
erwincoumans
0f30c95734 fix a compile error on Windows (variables need to be declared together at the start of a block in C) 2017-09-25 07:38:00 -07:00
Erwin Coumans
705a59ea73 Merge remote-tracking branch 'bp/master' 2017-09-24 22:50:55 -07:00
Erwin Coumans
2d91e13886 tweak pybullet examples a bit (mac OSX OpenGL runs in mainloop, with python interpreter,
so it needs some 'ping' command
bump up pybullet to version 1.4.6
2017-09-24 21:37:31 -07:00
Jeffrey Bingham
ee30ca93c5 [sharedmemory] Fill-out calculateJacobian command.
The server command processor actually didn't do anything with
the local point that was passed along with the calculateJacobian
command. Added in the necessary bit of math to return the
corresponding jacobian.

Also, fixed a typo in pybullet that was returning the same
jacobian for translation and rotation.
2017-09-24 18:57:48 -07:00
Erwin Coumans
70364445b8 Merge remote-tracking branch 'bp/master' 2017-09-24 09:49:53 -07:00
erwincoumans
b1d6f58981 Update pybullet.c
fix compile issue
2017-09-24 09:16:54 -07:00
Jeffrey Bingham
1727e47beb [pybullet] Add calculateJacobian.
* Add the calculateJacobian method to the pybullet API.
* Adjust the shared memory interface to handle fixed/floating bases
  in the calculateJacobian method.
* Fix a few comments.
2017-09-23 19:58:59 -07:00
erwincoumans
8e496036c6 More work on the C/C++ plugin system for pybullet/C-API:
Add preTickPluginCallback/postTickPluginCallback
User pointer for b3PluginContext, to store objects (class/struct instances)
Pass ints and floats as optional argument for plugin executePluginCommand
2017-09-23 18:05:23 -07:00
erwincoumans
37cfce99b2 add arguments to plugin system 2017-09-23 07:52:10 -07:00
Erwin Coumans
3783dccaa3 create a C/C++ plugin system for pybullet / C-API. 2017-09-22 19:17:57 -07:00
erwincoumans
6a7efac4c3 Quick first prototype/test to integrate pybullet into Unity,
see readme.txt for details.
2017-09-20 23:18:18 -07:00