Commit Graph

221 Commits

Author SHA1 Message Date
erwincoumans
7b56db9f97 fix compile issue/warning 2017-06-06 06:59:41 -07:00
Erwin Coumans
704269afe1 don't pass second parameter, pybullet func 2017-06-04 22:24:14 -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
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
yunfeibai
0a29c8d9af Get debug visualizer camera yaw, pitch, dist, and target. 2017-06-02 18:24:51 -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
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
erwincoumans
c36792c950 fix bodyIndex -> bodyUniqueId in pybullet. 2017-05-28 13:30:20 -07:00
erwincoumans
f9c53b39a2 fix pybullet build on some MSVC versions 2017-05-28 09:48:12 -07:00
Erwin Coumans
b645963879 expose pybullet changeDynamics(spinningFriction=..., rollingFriction=..., restitution=...)
Bullet C-API b3ChangeDynamicsInfoSetSpinningFriction/RollingFriction/Resitution
b3PhysicsParamSetRestitutionVelocityThreshold, / pybullet.setPhysicsEngineParameter restitutionVelocityThreshold:
if the velocity is below this threshhold, the restitution is zero (this prevents energy buildup at near-resting state)
pybullet restitution.py example.
2017-05-26 18:14:38 -07:00
Erwin Coumans
2b9c67b07c TinyRenderer: discard pixels beyond farplane
pybullet: printf build date/time
2017-05-25 17:25:14 -07:00
Erwin Coumans
5e2599863d trackObject -> parentObject
trackLinkIndex -> parentLinkIndex
add example debugDrawItems.py
2017-05-24 09:06:15 -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
c2fdffba35 pybullet.enableJointForceTorqueSensor kwlist was not properly terminated 2017-05-17 19:37:51 -07:00
Erwin Coumans
19295f2859 enable file caching, currently only for Wavefront .obj files. You can disable file caching using
pybullet.setPhysicsEngineParameter(enableFileCaching=0)
Allow VR camera tracking only using position tracking, no orientation tracking (use
pybullet.setVRCamera([posX,posY,posZ],trackObjectFlag=0 or pybullet.VR_CAMERA_TRACK_OBJECT_ORIENTATION)
2017-05-17 19:29:12 -07:00
Erwin Coumans
972660f825 Only initialized values if provided (and don't initialize default if not provided!)
fixes getCameraImage(width,height) crash
2017-05-17 17:25:34 -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
4dea68e43e allow to enable/disable VR picking and VR teleport. Disabling VR picking will also disable the rendering of the VR controller frames. 2017-05-15 11:39:39 -07:00
Erwin Coumans
bb4c195118 added getJointStates and make humanoid_running.py use it to reduce Python<->C++ calling overhead a lot. 2017-05-13 18:07: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
3bdc60c050 fix pybullet inversekinematics argument order (O/i)
add spinning friction to some tutorial
2017-05-12 11:18:33 -07:00
Erwin Coumans
0ad3fade4e physicsClientId always comes last for each pybullet command 2017-05-12 09:38:17 -07:00
Erwin Coumans
53a82819a0 expose b3LoadMJCFCommandSetFlags / pybullet.pybullet_loadMJCF(fileName,flags=pybullet.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS) 2017-05-10 15:01:25 -07:00
Erwin Coumans
051e3f8b0c Merge remote-tracking branch 'bp/master' 2017-05-09 11:37:25 -07:00
yunfeibai
a587d4fec4 Use "change" instead of "reset" for changing dynamics info. 2017-05-09 10:44:33 -07:00
yunfeibai
98654a0cb4 Change dynamic to dynamics in dynamics info. 2017-05-09 10:31:28 -07:00
Erwin Coumans
0f5b400895 pybullet: implement setJointMotorControlArray, the array version of setJointMotorControl2. This can improve performance in reinforcement learning loops (training / inference) by reducing Python/C-API/shared memory calling overhead. 2017-05-08 13:41:07 -07:00
yunfeibai
92de4ecd31 Add pybullet example to get dynamic info. 2017-05-07 22:41:05 -07:00
Erwin Coumans
1f64a87abe Improve ChromeTraceUtil logging, allow filename to be specified.
Expose this ChromeTraceUtil  logging to C-API: start/statelogging and submitProfileTiming
pybullet.submitProfileTiming, and STATE_LOGGING_PROFILE_TIMINGS used in startStateLogging
added example for Python profileTiming.py and C++ b3RobotSimulatorClientAPI::submitProfileTiming
2017-05-04 17:51:40 -07:00
Erwin Coumans
a7d08ca9d7 Merge remote-tracking branch 'bp/master' 2017-05-04 10:51:42 -07:00
Erwin Coumans
a86f584824 more work towards removeBody for C-API/pybullet, work-in-progress. 2017-05-03 21:53:29 -07:00
yunfeibai
939d6ead32 Add API to reset lateral friction coefficient. 2017-05-03 21:47:53 -07:00
yunfeibai
c7e9a31898 Add API to get user constraint id. 2017-05-03 18:25:25 -07:00
yunfeibai
4da2c076a7 Add API to reset mass. 2017-05-01 22:18:54 -07:00
Benelot
55414f5b20 Add link name to getJointInfo(...). 2017-04-25 23:58:30 +02:00
Erwin Coumans
5158c1ae98 add python dumpLog.py utility to view log files created using 'startStateLogging'
don't enable <CTRL> for hotkeys yet
add some more profile markers
log objectId and linkIndex as signed int ('i') and not unsigned int 'I'
fix issue in startStateLogging: number of parameters was wrong
2017-04-12 15:02:47 -07:00
Erwin Coumans
0a42ad6a88 pybullet: add support for Anaconda install on Mac OSX, for pip install pybullet, python setup.py install and cmake.
Usage:

Also updated pypi to latest, see https://pypi.python.org/pypi?:action=display&name=pybullet&version=0.1.7
Here are a few options for Mac OSX + Anaconda:

1) In the root of the Bullet Physics SDK source tree, run
CFLAGS="-DB3_NO_PYTHON_FRAMEWORK" python setup.py install

2) cmake, add the flag -DBUILD_PYBULLET_MAC_USE_PYTHON_FRAMEWORK=OFF

3) Globally, just use pip or pip3:
CFLAGS="-DB3_NO_PYTHON_FRAMEWORK" pip install pybullet

Option (3) may have an out-of-date pybullet/bullet version.
2017-04-11 12:17:08 -07:00
Erwin Coumans
bdf366b045 implement pybullet.getDebugVisualizerCamera, width, height, providing viewmatrix, projection matrix 2017-04-10 11:03:41 -07:00
Erwin Coumans
82b6bc8770 apply the deviceTypeFilter also to VR state logging. 2017-04-08 11:48:12 -07:00
Erwin Coumans
440d445a02 also report VR events for HMD and generic tracked devices. Also expose those VR events to pybullet: expose a deviceTypeFilter, that defaults to VR_DEVICE_CONTROLLER 2017-04-07 22:53:36 -07:00
erwincoumans
2e13531493 Merge pull request #1061 from erwincoumans/master
Implement rayTestBatch. At the moment, it is still testing individual…
2017-04-06 04:56:49 +00:00
Erwin Coumans
6cbb00fd6b Implement rayTestBatch. At the moment, it is still testing individual rays on the physics server. We can enable multi-threaded version later. At least the python + shared-memory IPC overhead will be much lower. 2017-04-05 15:21:26 -07:00
erwincoumans
ac91896025 Merge pull request #1054 from erwincoumans/master
pybullet setup.py / pip support for Windows, Linux and Mac! just run 'pip install pybullet' and wait until all compiled (like numpy, it is mainly source, except for a few wheels Mac 2.7 and Win32 3.5). Expose URDF_USE_SELF_COLLISION flag.
2017-04-04 23:36:32 +00:00
yunfeibai
fedf718d9e minor fix for pybullet comment. 2017-04-04 13:45:49 -07:00
Erwin Coumans
b095e1d917 expose pybullet.URDF_USE_SELF_COLLISION flag, experimental (likely doesn't work well for many URDF files) 2017-04-04 12:47:34 -07:00
yunfeibai
b168f53ed9 Rename body index to body unique id. 2017-04-04 10:38:25 -07:00
yunfeibai
1e91e78469 Add pybullet API for logging contacts. 2017-04-02 16:03:20 -07:00
Erwin Coumans
473196a492 remove vld.h 2017-03-30 13:56:37 -07:00
Erwin Coumans
a7c67b4d9d avoid memory leaks, even if a the python interpreter exits without calling 'disconnect' on all physics servers
(register a Py_AtExit function that cleans all up), to avoid memory leaks
2017-03-30 13:50:02 -07:00