Commit Graph

697 Commits

Author SHA1 Message Date
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
afd1066c50 pybullet.getCameraImage: preparation to expose link index in segmentation mask buffer 2017-12-28 10:18:35 -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
Erwin Coumans
799d030874 restore multibody world transform and joint angles/velocities from a .bullet file. 2017-12-22 14:45:36 -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
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
76772fd301 reduce stack usage 2017-11-22 15:30:56 -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
Erwin Coumans
3e17f3387a reduce MAX_SDF_BODIES to 512, it causes stack overflow failures in some internal tests 2017-11-20 11:05:31 -08:00
Erwin Coumans
88289c032e fix canvas issues from previous commit 2017-11-18 17:20:21 -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
b2a1eeb754 Merge remote-tracking branch 'bp/master' 2017-11-17 16:21:09 -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
848be4710e
Merge pull request #1440 from erwincoumans/master
remove obsolete 'register' from BussIK
2017-11-17 14:13:16 -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
f31f552ee3
Merge pull request #1439 from mbreyer/bugfix-TinyRenderer
Fix wrong depth values returned by TinyRenderer
2017-11-17 09:39:55 -08:00
Michel Breyer
f7e593f8e9 Simplify the depth value transformations to reduce the number of operations 2017-11-17 15:15:11 +01:00
Michel Breyer
bb2ee12b86 Initialize TinyRenderer's depth buffer properly. 2017-11-17 14:59:24 +01:00
Michel Breyer
5138fe2c55 Fix wrong depth values returned by TinyRenderer 2017-11-17 14:48:41 +01: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
b5bf70cb80 fix potential memory leak when manually loading a texture (pybullet.loadTexture), due to URDF/SDF texture caching (manually loading textures are not cached) 2017-11-09 11:09:07 -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
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
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
cbc2732cbd Also added fix for Direct. 2017-10-22 16:07:00 -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
Erwin Coumans
10527e12eb fix Mac OSX build, openvr 32bit/64bit was not selected, library out-of-date 2017-10-11 17:20:26 -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
e5d4c73c40 fix very rare threading issue, let main thread compute the UID for user debug items
add collision model to cartpole.urdf
2017-10-09 22:40:53 -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
Erwin Coumans
1034c7e720 reorder initializer 2017-10-06 17:30:10 -07:00