Commit Graph

434 Commits

Author SHA1 Message Date
Erwin Coumans
77c332bd88 PyBullet: add option to cache graphics shapes for URDF files, handy for benchmarks with many duplicate robots
See https://github.com/erwincoumans/pybullet_robots ANYmal.py for an example.
PyBullet: Expose p.setPhysicsEngineParameter(solverResidualThreshold=1e-2) (b3PhysicsParamSetSolverResidualThreshold), increases solver performance a lot
PyBullet: Expose p.setPhysicsEngineParameter(contactSlop) Set it to zero, to avoid issues with restitution.
PyBullet: Expose isNumpyEnabled, return True is PyBullet was compiled with NUMPY support for 'getCameraImage'.
PyBullet: Expose p.ChangeDynamics(objectUid, linkIndex, contactProcessingThreshold), to avoid issues of speculative/predictive contacts with restitution.
See also http://twvideo01.ubm-us.net/o1/vault/gdc2012/slides/Programming%20Track/Vincent_ROBERT_Track_ADifferentApproach.pdf
2018-05-23 13:26:00 +10:00
erwincoumans
034dfba3ae fix VR controllers only visible in one eye (remove stray glClear for testing planar reflection)
PyBullet: force both contactStiffness and contactDamping (report error otherwise)
2018-05-16 14:24:12 -07:00
erwincoumans
e5a9b42f9a expose PyBullet.setPhysicsEngineParameter(jointFeedbackMode)
use p.JOINT_FEEDBACK_IN_JOINT_FRAME if you want the joint feedback expressed in joint frame (instead of link inertial frame)
use p.JOINT_FEEDBACK_IN_WORLD_SPACE if you want the joint feedback in world space coordinates, instead of local link/joint coordinates.
Example: p.setPhysicsEngineParameter(jointFeedbackMode=p.JOINT_FEEDBACK_IN_WORLD_SPACE+p.JOINT_FEEDBACK_IN_JOINT_FRAME)
2018-05-11 19:52:06 -07:00
erwincoumans
1ec24a0853 fix PyBullet.applyExternalTorque for links (instead of base) 2018-05-11 19:35:27 -07:00
erwincoumans
3116cd82da fix MSVC 2010 compile issue
urdfEditor: fix scale incorrectly saved in urdfEditor.saveUrdf
urdfEditor: fix linkMeshScaleArray in wrong location
2018-05-10 12:04:13 -07:00
Erwin Coumans
7383843b24 expose PyBullet.SHARED_MEMORY_SERVER
connect from 1 different PyBullet client using PyBullet.SHARED_MEMORY)
(don't use more than 1 other client to submit commands in parallel)
2018-05-07 15:57:36 -07:00
erwincoumans
790deb2d54 fix memory leak in PyBullet.getJointStates, fixes issue #1661 2018-05-02 13:12:25 -07:00
erwincoumans
9c5d757879 PyBullet: fix memory leak in setJointMotorControlArray
Fixes issue #1633
2018-04-12 12:43:29 -07:00
erwincoumans
ffc808784b PyBullet: add planar reflection example,
See examples/pybullet/examples/addPlanarReflection.py
2018-04-11 01:03:36 -07:00
erwincoumans
31ab72a0ed
Merge pull request #1609 from YunfeiBai/master
Add PyBullet API to set projective texture.
2018-03-26 16:27:14 -07:00
Hervé Audren
a2e9ecd957 Fix jacobian computation 2018-03-26 18:40:42 +09: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
jietan
f4ca3f5963 Fix a bug that createVisualShape(Array) does not have the correct color. Add urdfEditor.py to pybullet_utils. Remove all unnecessary changes of white spaces. 2018-03-14 21:14:44 -07:00
jietan
413be3547b fix a bug that createVisualShape(Array) does not have the correct color. Add urdfEditor.py to pybullet_utils. 2018-03-12 21:06:19 -07:00
Erwin Coumans
69d343386d PyBullet/C-API: implement createVisualShapeArray, with multiple visual shapes (require 1 texture max, since visual shapes are merged) 2018-03-09 18:02:06 -08:00
erwincoumans
ddf304ca78 PyBullet: expose internal edge utility, to adjust edge normals to prevent object penetrating along triangle edges of concave triangle meshes
(due to local convex-triangle collisions causing opposite contact normals, use the pre-computed edge normal)
PyBullet: expose experimental continuous collision detection for maximal coordinate rigid bodies, to prevent tunneling.
2018-02-16 19:44:33 -08:00
erwincoumans
d3fe21ef17 Add option GUI_MAIN_THREAD for running OpenGL in the main thread (Python thread). This already happens on Mac OSX by default.
Pass all argc/argc from options to InProcessPhysicsClientSharedMemoryMainThread
2018-02-14 16:49:44 -08:00
erwincoumans
387d3f16db PyBullet: fix memory leak in case connection to shared memory cannot be made
PyBullet: allow setJointMotorControl2 to use maxVelocity in combination with obsolete 'bodyIndex'
2018-01-15 08:33:19 -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
erwincoumans
22b4809891 leave m_useGlobalVelocities to false, until enabled, for backward compatibility
use URDF_GLOBAL_VELOCITIES_MB flag in PyBullet loadURDF.
fix robot_bases.py due to new fields in getJointInfo.
backward compabitibility: BulletMJCFImporter, keep creating btMultiSphereShape for MJCF capsules with fromto, instead of shifted btCapsuleShapeZ, unless if CUF_USE_IMPLICIT_CYLINDER is used.
2018-01-10 11:16:50 -08:00
erwincoumans
c4b1b84687 Enable 'global absolute velocities' by default for btMultiBody. See 8.3.2B Proposed resolution Jakub Stepien PhD Thesis
https://drive.google.com/file/d/0Bz3vEa19XOYGNWdZWGpMdUdqVmZ5ZVBOaEh4ZnpNaUxxZFNV/view?usp=sharing
Fixes crashes due to rendering of softbody wireframe in the wrong thread (needs to be in 'debug' rendering section)
Use btCapsuleShapeZ instead of btMultiSphereShape when converting MJCF MuJoCo capsules using fromto
2018-01-09 22:47:56 -08:00
erwincoumans
e138e85bca allow to enable/disable implicit cylinder conversion through an API
p.loadURDF("r2d2.urdf", flags=p.URDF_USE_IMPLICIT_CYLINDER)
allow to enable/disable deterministicOverlappingPairs through an API
p.setPhysicsEngineParameter(deterministicOverlappingPairs = False)
2018-01-09 10:10:36 -08:00
erwincoumans
bf6d805228 fix compile issues on Windows after recent softbody patch 2018-01-09 08:43:00 -08:00
YunfeiBai
de3b8bf3c9
Merge branch 'master' into master 2018-01-08 18:13:03 -08:00
yunfeibai
0e0d3da2b5 Add python binding and a pybullet example for loading softbody from obj. 2018-01-08 18:10:28 -08:00
Erwin Coumans
90c5d66e1b fix for Python 2.x 2018-01-08 16:15:54 -08:00
Erwin Coumans
e97b751781 further work on urdfEditor.py, fix some serialization issues 2018-01-08 12:25:56 -08:00
Erwin Coumans
79d78a325a Start of a urdfEditor.py, limited support to extract a URDF from a PyBullet body.
Use btCylinderShapeZ for URDF cylinder, instead of converting it to a btConvexHullShape.
Implement PyBullet.getCollisionShapeData
Extend PyBullet.getDynamicsInfo / b3GetDynamicsInfo, remove flag (don't rely on API returning a fixed number of elements in a list!)
Extend PyBullet.getJointInfo: add parentIndex
2018-01-03 19:17:28 -08:00
Erwin Coumans
35b44f8a85 implement pybullet.saveState command, for in-memory storage of state.
bump up pybullet API version (SHARED_MEMORY_MAGIC_NUMBER) to 201801010
2017-12-31 15:37:16 -08:00
Erwin Coumans
0326fa93a8 made some progress in saving and restoring the state during the simulation, with identical results.
Option to de/serialize btPersistentContactManifolds and fix lossy conversion during btMultiBody de/serialization of base world transform
(serialize the quaternion, not the converted 3x3 matrix)
There are still several caches not taken into account, and btMultiBody links/constraints are not deserialized yet etc.
See examples\pybullet\examples\saveRestoreState.py for an example.
2017-12-30 14:19:13 -08:00
Erwin Coumans
29cfac096b compile fix in pybullet.c 2017-12-28 12:57:49 -08:00
Erwin Coumans
5517cbc4e0 add segmask_linkindex.py example using p.getCameraImage(320,200,flags=p.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX)
to extract object unique id and link index from segmentation mask in getCameraImage
2017-12-28 12:37:07 -08:00
Erwin Coumans
97547eda0d preliminary work towards saveState/restoreState and saveRestoreState.py example (not implemented yet)
allow multiple options in connect, for example: p.connect(p.GUI, options="--width=640, --height=480")
2017-12-28 10:05:51 -08:00
erwincoumans
41f9bb89e5 expose API to change the local inertia diagonal, pybullet.ChangeDynamics(objectUid, linkIndex, localInertiaDiagonal=[xx,yy,zz]) 2017-12-20 16:56:31 -08:00
erwincoumans
eb35cba740 expose local inertia diagonal in C-API, PyBullet, through the 'getDynamicsInfo'
render the inertia boxes in examples/pybullet/examples/quadruped.py and examples/pybullet/examples/reset_dynamic_info.py
fix an issue where the original margin (0.04) was used to compute the inertia, instead of latest margin
2017-12-20 14:54:32 -08:00
Erwin Coumans
c556ad651d expose pybullet 'enableConeFriction' to switch between pyramid and cone friction model. 2017-12-01 10:07:07 -08:00
erwincoumans
8ff75e11cd fixes related to torsional friction, due to recent cone friction update. 2017-11-28 20:09:56 -08:00
erwincoumans
b1c2bdc72a pybullet: fix numpy compile issue on Windows, another fix 2017-11-24 16:50:36 -08:00
Erwin Coumans
82b51ac78d pybullet: fix Windows numpy build 2017-11-24 14:33:24 -08:00
erwincoumans
ab843b26f0 expose a maximum velocity due to the joint motor in position control.
see also pybullet/examples/motorMaxVelocity.py
this fixes issue 1444
2017-11-21 17:05:28 -08:00
erwincoumans
e2d29d4048 also enable depth and segmentation mask preview window in example browser/pybullet
You can disable/enable all preview windows using:

p.configureDebugVisualizer(p.COV_ENABLE_RGB_BUFFER_PREVIEW,0/1)
p.configureDebugVisualizer(p.COV_ENABLE_DEPTH_BUFFER_PREVIEW,0/1)
p.configureDebugVisualizer(p.COV_ENABLE_SEGMENTATION_MASK_PREVIEW,0/1)
2017-11-17 13:33:27 -08:00
erwincoumans
e982efc18a fix in previous commit related to pybullet.c changeUserConstraint / pybullet_internalSetMatrix 2017-11-12 21:53:14 -08:00
erwincoumans
6be7e34dd6 pybullet vr_kuka_setup.py: add a gear joint, to keep the gripper centered,
vr_kuka_control.py: control all joints, use analogue button to close gripper
remove some debug warnings/prints
pybullet, avoid crash in changeUserConstraint if not passing a [list]
allow some gym environments (pybullet_pendulum and locomotors) to re-use an existing physics client connection.
2017-11-12 10:36:30 -08:00
Erwin Coumans
d570730b8e fix pybullet and bump up version to 1.6.4 2017-11-07 21:11:16 -08:00
Erwin Coumans
5701b5b152 expose COV_ENABLE_Y_AXIS_UP to pybullet
increase MAX_SDF_BODIES from 512 to 1024 (botlab needs it)
2017-11-04 12:51:13 -07:00
erwincoumans
7524e37124 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-10-25 08:15:14 -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
Jonathan Tompson
03b2cfe991 Added gear info to getConstraintInfo return.
Fixed bug in GEAR constraint update.
2017-10-22 15:01:13 -07:00
erwincoumans
28ea41bfe6 Merge pull request #1393 from YunfeiBai/master
Expose IK solver options: DLS and SDLS.
2017-10-20 13:22:56 -07:00
yunfeibai
dda1b05f4a Expose IK solver options including DLS and SDLS. 2017-10-19 14:00:53 -07:00
Erwin Coumans
c178c101a8 fix the pybullet.changeDynamics linear/angular damping
expose pybullet.getConstraintState
2017-10-18 19:15:35 -07:00
erwincoumans
cb23e6c102 Fix pybullet.calculateInverseDynamics in the case where #dof != #joints (fixed joints). We still don't handle spherical joints in pybullet (even though the underlying inverse dynamics and forward dynamics support it)
Also, add a inverse_dynamics.py example, with URDF files. Thanks to Michiel Lutter for the report and repro case!
This fixes issue #1379 https://github.com/bulletphysics/bullet3/issues/1379
2017-10-13 14:19:25 -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
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
Jeffrey Bingham
e04820af73 Add calculateMassMatrix to pybullet.c 2017-09-30 20:39:56 -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
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
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
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
Erwin Coumans
74475479cf fix pybullet, checked wrong type after connection 2017-09-13 17:05:23 -07:00
Erwin Coumans
7e0ca070e0 fix return values in pybullet to be Pythonic. 2017-09-13 16:08:30 -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
erwincoumans
ee30479a28 add option to log joint torques (due to user applied torques and/or motor torques)
See quadruped.py for an example:
p.startStateLogging(p.STATE_LOGGING_GENERIC_ROBOT, "genericlogdata.bin", maxLogDof = 16, logFlags = p.STATE_LOG_JOINT_TORQUES)
Thanks to JulianYG, in pull request https://github.com/bulletphysics/bullet3/pull/1273
2017-08-30 19:41:15 -07:00
erwincoumans
1f7db4519e enable motor control for maximal coordinates robots (btRigidBody, btTypedConstraint) for force, velocity, position control. 2017-08-29 19:14:27 -07:00
Erwin Coumans
1569f3845c more fixes in pybullet_gym envs/data.
implement pybullet.setAdditionalSearchPath
2017-08-27 19:34:00 -07:00
Erwin Coumans
659e869b86 pybullet a bit more refactoring, moving around files.
pybullet: move data to pybullet_data package, with getDataPath() method
2017-08-27 18:08:46 -07:00
Erwin Coumans
bcc60224f0 all methods (except connect, obviously) have the physicsClientId argument, even if they don't use it. This makes it easier to create a wrapper API to store the physics client. This allows easier multi-threaded versions with multiple Bullet DIRECT instances (or SHARED_MEMORY, TCP, UDP etc).
See for example https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_envs/bullet/bullet_client.py and https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_envs/bullet/minitaur.py
2017-08-25 14:04:45 -07:00
Erwin Coumans
a66576f034 revert API to be backward compatible, add b3CreateInProcessPhysicsServerAndConnectSharedMemory
same for BulletURDFImporter constructor
2017-08-16 12:33:25 -07:00
erwincoumans
2e0a987750 pybullet only allow one GUI/GUI_SERVER instance.
Fix LINK_FRAME/WORLD_FRAME coordinate issue in pybullet applyExternalForce
2017-08-15 14:15:30 -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
aafaa7e33e Expose optional "globalScaling" factor to pybullet.loadURDF and pybullet.loadSDF. This will scale the visual, collision shapes and transform locations.
Fix two_cubes.sdf (was lacking collision shape for second cube)
2017-08-14 14:59:41 -07:00
yunfeibai
cfc7917586 Add init function and module for pybullet with EGL. 2017-07-18 13:52:29 -07:00
Erwin Coumans
5178ad4abc add proper pointer casts 2017-07-01 10:28:28 -07: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
erwincoumans
c777e61d48 fix pybullet compilation on some WIN32 version of MSVC 2017-06-23 20:36:19 -07:00
Erwin Coumans
65e22ba3e9 allow auxilary link to be used for gear btMultiBodyGearConstraint. 2017-06-23 20:24:04 -07:00
Erwin Coumans
2ab56b4d62 Allow to create concave collision meshes. Note that this is only supported for static (mass 0) multibodies. 2017-06-23 14:43:28 -07:00
Erwin Coumans
61f27a5c72 also add baseInertialFramePositionObj and baseInertialFrameOrientationObj to pybullet.createMultiBody
updated createMultiBodyLinks.py example.
2017-06-19 17:13:20 -07:00
Erwin Coumans
7441515c0e Preliminary version of pybullet.createMultiBody including links connected to parent by a joint.
See createMultiBodyLinks.py example.
2017-06-19 13:15:05 -07:00
Erwin Coumans
f3c11b6f31 add capsule, cylinder, plane, mesh support for pybullet.createCollisionShape
preparation to add links to pybullet.createMultiBody
2017-06-19 10:14:26 -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
Erwin Coumans
23b155a2b4 add getAABB.py example.
fix getAABB / b3RequestCollisionInfoCommandInit to use less stack memory
2017-06-16 18:10:10 -07:00
Erwin Coumans
bb8cfe3c9a pybullet.getAABB and getAPIVersion
fix btMultiBody::getLinkCollider
bump up Bullet C-API version
2017-06-15 19:46:27 -07:00
Michel Breyer
0c7cf47eb9 fix uninitialized erp in pybullet_setPhysicsEngineParameter 2017-06-13 17:24:35 +02:00
Michel Breyer
6d84e5e159 fix memcpy of depth and segmentation images to numpy arrays 2017-06-12 16:28:21 +02:00
Erwin Coumans
60e3887456 enable btGearConstraint, expose 'changeDynamics' for gearRatio, only works for maximalCoordinates rigid bodies.
See examples\pybullet\examples\mimicJointConstraint.py
2017-06-07 13:44:34 -07:00
Erwin Coumans
d08f3e5f91 expose pybullet non-contact erp, friction erp and frictionAnchor, b3PhysicsParamSetDefaultNonContactERP / b3PhysicsParamSetDefaultFrictionERP / b3ChangeDynamicsInfoSetFrictionAnchor 2017-06-07 09:37:28 -07:00
Erwin Coumans
0c3a3cc466 pybullet.changeDynamicsInfo/b3ChangeDynamicsInfoSetContactStiffnessAndDamping expose contactStiffness/contactDamping 2017-06-07 08:37:42 -07:00
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