Commit Graph

392 Commits

Author SHA1 Message Date
erwincoumans
a92423b6f7 minor clarification in UrdfRenderingInterface 2018-01-21 11:15:35 -08:00
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
erwincoumans
df89ce6f92 small refactor of LinkVisualShapesConverter / TinyRendererVisualShapeConverter, it allows to use it in a Python module and in a PyBullet plugin. 2018-01-16 17:58:19 -08:00
Erwin Coumans
af43e6465d fix wrong enum type 2018-01-15 15:13:11 -08:00
erwincoumans
9d405fde67 PyBullet: free cached textures
PyBullet: bool PhysicsServerCommandProcessor::pickBody, disable collision filtering to allow picking of all objects
2018-01-15 08:36:08 -08:00
erwincoumans
3c770e56fb PyBullet/C-API: only free handle if we found it 2018-01-14 12:35:40 -08:00
erwincoumans
0919ce0f30 PyBullet: fix issue when picking an object while it is remove using PyBullet.removeBody 2018-01-14 11:01:57 -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
YunfeiBai
de3b8bf3c9
Merge branch 'master' into master 2018-01-08 18:13:03 -08:00
Erwin Coumans
e97b751781 further work on urdfEditor.py, fix some serialization issues 2018-01-08 12:25:56 -08:00
yunfeibai
d3bc98e245 Add filename as an argument in the softbody loading function. 2018-01-07 19:56:46 -08:00
yunfeibai
d077bdec07 Change the API names for loading softbody. 2018-01-07 19:24:37 -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
Erwin Coumans
a85a4f387b more work on UrdfEditor.py 2018-01-06 15:00:20 -08:00
Erwin Coumans
c59a3763e5 tweak ImportMJCFSetup.cpp example MJCF humanoid a bit, clamp target positions to be within joint limits to avoid solver problems (conflicting constraints)
add humanoid_manual_control.py PyBullet example which is similar to ImportMJCFSetup.cpp
2018-01-04 13:14:11 -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
9c55b61315 pybullet.createVisualShape: process sphere radius, box half extents, capsule+cylinder radius/length
fixes issue #1427, https://github.com/bulletphysics/bullet3/issues/1427
2017-12-30 17:42:13 -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
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
erwincoumans
8ff75e11cd fixes related to torsional friction, due to recent cone friction update. 2017-11-28 20:09:56 -08:00
erwincoumans
29aa9cb789 Bullet bump up to version 2.88
add preliminary support to import btMultiBody from a .bullet file (will help save/restore state)
fix some Windows char/widechar issues
2017-11-22 18:12:02 -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
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
a9b59b4511 Finally refactored the PhysicsServerCommandProcessor::processCommand switch statements into over 50 separate functions.
Over time, some of those functions can be moved into separate plugins, similar to vrSyncPlugin (either statically/dynamically linked plugins or dynamically loaded at run-time)
2017-11-17 16:14:18 -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
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
erwincoumans
c1ba04a580 Merge pull request #1404 from erwincoumans/master
perform IK in local body-fixed frame ,  add jointFrictionDamping.py example
2017-10-25 00:52:16 +00:00
Erwin Coumans
7a1dbf2e59 allow IK on a floating base, see video:
add inverse_kinematics_husky_kuka.py example
fix spacing in inverse_dynamics.py
2017-10-25 00:32:47 -07:00
Erwin Coumans
41a1362bc5 perform IK in local body-fixed frame
For now, Jacobian, mass matrix and inverse dynamics return results in local coordinates of the tree.
2017-10-24 21:06:44 -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
de44e4811a fix pybullet.addUserDebugText borders around letters
bump up pybullet version
In a few pybullet examples, first connect to SHARED_MEMORY, if not connected use GUI mode
2017-10-10 22:11:32 -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
6b4f69f733 Merge remote-tracking branch 'bp/master' 2017-10-09 21:09:23 -07:00
yunfeibai
55b60e90f7 Modify inverse kinematics to also support robot model with fixed joint. 2017-10-09 18:28:52 -07:00
Erwin Coumans
d48e2a20af fix a string check issue 2017-10-09 12:28:39 -07:00
Jonathan Tompson
2dee1638f4 quick update to SAVE_WORLD for JOINT_GEAR. 2017-10-09 10:48:03 -07:00
erwincoumans
7d7f5ee7d4 Merge pull request #1371 from jonathantompson/userConstraintResultArgs_fix
Fixed setting of m_userConstraintResultArgs.
2017-10-08 22:56:56 -07:00
Jonathan Tompson
a57c7e7fcf Fixed setting of m_userConstraintResultArgs (not sure how it ever worked for anyone). It was filling up the userConstraintData with stale memory. 2017-10-08 21:31:29 -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