Commit Graph

532 Commits

Author SHA1 Message Date
erwincoumans
0af0f193ee reduce size of SharedMemoryStatus by moving state details into shared memory streaming block. 2019-03-06 23:27:59 -08:00
Pandhariix
4801425910 Use the correct structure in the PhysicsServerCommandProcessor::processRequestRaycastIntersectionsCommand method 2019-02-28 18:24:32 +01:00
erwincoumans
8e1c1448ab Expose motor drive torque reporting for motors in spherical joints in getJointStateMultiDof. 2019-02-27 09:54:12 -08:00
erwincoumans
33619893c7 fixed failed git merge 2019-02-18 18:34:11 -08:00
erwincoumans
bdf9b10246 more work on pybullet_envs.deep_mimic.
allow btMultiBody to not wakeup (for some RL experiments)
move deep_mimic motion files to data/motions folder, so we can use the args files unmodified.
2019-02-18 17:57:02 -08:00
erwincoumans
dc8a40f7dc PyBullet: fix issue with setCollisionFilterGroupMask 2019-02-17 12:02:52 -08:00
erwincoumans
e7e46154bb
Merge pull request #2106 from erwincoumans/master
fast createMultiBody batch creation, more deep_mimic work
2019-02-12 12:10:10 -08:00
erwincoumans
85ee4c2934 allow batch creation of objects through PyBullet.createMultiBody, see createMultiBodyBatch.py example.
expose minGraphicsUpdateTimeMs through PyBullet.connect(p.GUI, options="minGraphicsUpdateTimeMs=32000"), by default OpenGL rendering runs at 4000microseconds intervals.
allow a maximum of 128k objects
fix meshScale for PyBullet.createCollisionShape for custom mesh
expose Pybullet.setPhysicsEngineParameter(minimumSolverIslandSize=...), larger minimum batches group solver constraints together in the same island, to reduce calling overhead (even if they are not related)
2019-02-12 10:36:01 -08:00
Tigran Gasparian
d9e36935e6 Adds extra information about the UserData in the notifications.
When using the USER_DATA_ADDED and USER_DATA_REMOVED notifications, some
more information is necessary than just the user data id, especially
when a user data entry has been removed.
2019-02-12 12:02:20 +01:00
erwincoumans
42369aa47d PyBullet.changeDynamics: expose jointDamping
PyBullet: Implement a few more APIs of PhysX backend, resetJointState and setJointMotorControl2
allow useMaximalCoordinate=True for PhysX loadURDF (only for single rigid bodies, articulations require reduced coordinates at the moment)
2019-02-04 21:06:43 -08:00
erwincoumans
014c68388e fix createVisualShape.py ray vertical/horizontal and retina scale, fixes Issue 2085
fix memory leak in removeBody, fixes issue 2086
2019-01-30 15:29:43 -08:00
Erwin Coumans
b257bd731b PyBullet: allow createVisualShape to pass vertices, indices, normals and uv coordinates. This can be combined with changeVisualShape to set the texture. 2019-01-29 12:03:11 -08:00
erwincoumans
52c8e14646 deal with 1-DOF and 3-DOF joints separately in resetJointState, fixes Issue 2076 2019-01-26 17:53:10 -08:00
Erwin Coumans
7b99810e4e fix case sensitive include header name 2019-01-23 12:50:44 -08:00
erwincoumans
ae8e83988b Add preliminary PhysX 4.0 backend for PyBullet
Add inverse dynamics / mass matrix code from DeepMimic, thanks to Xue Bin (Jason) Peng
Add example how to use stable PD control for humanoid with spherical joints (see humanoidMotionCapture.py)
Fix related to TinyRenderer object transforms not updating when using collision filtering
2019-01-22 21:08:37 -08:00
Erwin Coumans
19aafd5221 PyBullet: handle the switch from fixed base to floating base when changing mass from zero to non-zero 2019-01-03 17:35:12 -08:00
Erwin Coumans
bf9efffa4b Increase mesh allocation for vertices/indices in PyBullet.createCollisionShape
See createMesh.py for an example.

The data has to fit in shared memory, hence the limit on Mac is lower than Windows and Linux:

#ifdef __APPLE__
#define B3_MAX_NUM_VERTICES 8192
#define B3_MAX_NUM_INDICES 32768
#else
#define B3_MAX_NUM_VERTICES 131072
#define B3_MAX_NUM_INDICES 524288
#endif
2019-01-03 16:19:28 -08:00
erwincoumans
9c4136da16 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2018-12-19 20:15:40 -08:00
erwincoumans
8e8c3fb315 few fixes in inverse dynamics 2018-12-19 20:15:30 -08:00
Erwin Coumans
d4db50f668 PyBullet: fix some file leaks. 2018-12-04 19:37:25 +01:00
erwincoumans
dc642c6e65 fix previous commit related to dofcount in inverse dynamics 2018-11-27 19:38:19 -08:00
erwincoumans
192d27743a enable pybullet.calculateInverseDynamics for floating bodies
Using calculateInverseDynamics with zero target acceleration allows to compute the non-linear dynamics forces (coriolis/gyroscopic) and/or gravity force.
2018-11-27 08:49:56 -08:00
erwincoumans
f9f8d0fbb0 example for fileIOPlugin.py loading SDF and its assets from a single zipfile,
also show how to disable file caching (used in the fileIOPlugin)
2018-11-17 14:11:01 -08:00
erwincoumans
7dd524075c Implement btMultiBodySphericalJointMotor, able to track a quaternion position target.
Expose this btMultiBodySphericalJointMotor through PyBullet.setJointMotorControlMultiDof
Expose PyBullet.getQuaternionSlerp
Improve PyBullet.setJointMotorControlMultiDof
Improve humanoidMotionCapture.py with slerp and using setJointMotorControlMultiDof
Expose  btMultiBody::spatialTransform
Fix btMultiBody::setupPlanar from DeepMimic codebase
Add support for multidof joints in btMultiBody::compTreeLinkVelocities, thanks to DeepMimic codebase @xbpeng
2018-11-13 14:32:18 -08:00
erwincoumans
17219f84c6 make setJointPosMultiDof and setJointVelMultiDof argument const.
add PyBullet.resetJointStateMultiDof / getJointStateMultiDof, for preliminary support for spherical and planar joints
2018-11-10 14:26:31 -08:00
erwincoumans
49b098854e PyBullet: avoid calling syncBodies for each DOF in pdControl.
Allow PD_CONTROL in setJointMotorControlArray.
2018-11-07 09:29:19 -08:00
Erwin Coumans
882252f8c0 move global from btMultiBody into dynamicsWorld.getSolverInfo 2018-11-05 10:50:03 -08:00
Erwin Coumans
8e82de1b00 add rudimentary MuJoCo mjcf xml to ROS URDF file, based on
pybullet_utils.urdfEditor
2018-10-31 11:02:19 -07:00
erwincoumans
c80e2816ad PyBullet: Use fileIOPlugin in processRestoreStateCommand
PyBullet: Report debug information in case of failure in restoreState.
2018-10-29 12:08:34 -07:00
erwincoumans
078887c4d7 PyBullet fileIOPlugin: don't add equal fileIO interface twice (based on identical fileIOType and pathPrefix)
loadBullet goes through fileIOPlugin
2018-10-29 10:25:40 -07:00
erwincoumans
bdda7af8d7 Use the kF_UseGjkConvexCastRaytest for more accurate picking
fix upAxis in some demos
2018-10-27 11:38:38 -07:00
erwincoumans
a44df2b0a6 PyBullet: allow to pass vertices (for convex) and vertices+indices (for concave) to createCollisionShape
See createObstacleCourse.py for an example use. At the moment a limit of 1024 vertices and 1024 indices.
Will be lifted once we implement the streaming version (soon).
2018-10-26 10:18:51 -07:00
Tigran Gasparian
6512a67422 Uses btCollisionBody::isActive instead of btMultiBody::isAwake to
determine whether to send transform changed notifications.
2018-10-22 14:06:58 +02:00
erwincoumans
ed49edc1af PyBullet change API (since it was broken): pybullet_changeVisualShape with textureUniqueId ==-1 will clear the texture
b3InitUpdateVisualShape doesn't take textureUniqueId by default. new API b3UpdateVisualShapeTexture to change texture (-1 will clear texture)
PyBullet/BulletRobotics: allow to reset the textureUniqueId to -1, to clear a texture
PyBullet/BulletRobotics: save all texture handles
2018-10-20 15:56:56 -07:00
erwincoumans
b5e475aec3 enable planar reflection in MinitaurGymEnv
enable follow cam in other Gym locomotion environments
add testing assets for multi-material obj files -> sdf conversion.
Also use ER_NO_SEGMENTATION_MASK flag for TinyRenderer/EGL plugin renderer
2018-10-14 15:10:19 -07:00
erwincoumans
c1e20c448f Implement InMemoryFile for memory caching for fileIO plugin.
Support SDF loading through fileIO plugin.
Replace strcspn by C code (not crossplatform)
Add flag for loadURDF to use color from MTL file (instead from URDF link material)
pybullet.URDF_USE_MATERIAL_COLORS_FROM_MTL and pybullet.URDF_USE_MATERIAL_TRANSPARANCY_FROM_MTL
2018-10-14 12:54:34 -07:00
erwincoumans
f792a5951a move zipfFileIO into own header
route loadTextureFile from fileIO plugin
fix B3_ENABLE_FILEIO_PLUGIN logic
2018-10-11 10:58:14 -07:00
erwincoumans
bb305c6ebc allow to provide rayCastBatch in local 'from'/'to' with a parent/link index, b3RaycastBatchSetParentObject
If parentObjectUniqueId provided, convert local from/to into world space coordinates
AddUserDebugLins: don't block when replacing an item
Fix examples/pybullet/examples/inverse_kinematics.py
2018-10-10 23:31:50 -07:00
erwincoumans
dba239fe8d First pass of load files through an interface (to allow loading from memory, zip file etc). So instead of posix fopen/fread, using CommonFileIOInterface.
A fileIO plugin can override custom file IO operations. As a small test, load files from a zipfile in memory.
Default fileIO implementation is in examples/Utils/b3BulletDefaultFileIO.h
Affects URDF, SDF, MJCF, Wavefront OBJ, STL, DAE, images.
2018-10-08 21:27:08 -07:00
erwincoumans
c0e38cd921
Merge pull request #1896 from jviereck/jviereck_add_lateral_contact_info
Adding support for lateral friction to getContactPoints()
2018-10-06 15:27:14 -07:00
bla
83c3094086 Merge remote-tracking branch 'bp/master' 2018-10-05 19:42:26 -07:00
erwincoumans
2c13e70d1a make projective textures work in DIRECT+eglPlugin (see examples/pybullet/examples/projective_texture.py) 2018-10-05 19:24:44 -07:00
erwincoumans
67954a873e
Merge pull request #1917 from erwincoumans/master
reverse ER_SEGMENTATION_MASK to ER_NO_SEGMENTATION_MASK so segmentation
2018-10-04 18:41:16 -07:00
Erwin Coumans
24ca5afe95 reverse ER_SEGMENTATION_MASK to ER_NO_SEGMENTATION_MASK so segmentation
mask is rendered by default
2018-10-04 14:14:24 -07:00
Wenlong Lu
24f5b819cf fix a memory leak 2018-10-02 10:58:23 -07:00
erwincoumans
8aff1fbd49 removed flags from loadURDF command. The flags are already available in m_data->m_flags in BulletUrdfImporter.cpp 2018-10-02 08:39:47 -07:00
erwincoumans
c9bd997acf
Merge pull request #1910 from WenlongLu/create_status
Two minor updates for PhysicsServerCommandProcessor
2018-10-01 18:53:13 -07:00
Wenlong Lu
085984f003 update complete status for removing collision shape 2018-10-01 17:54:23 -07:00
Wenlong Lu
167520a5e6 pass plane constant 2018-10-01 17:38:24 -07:00
Erwin Coumans
42ae4e81a8 apply clang-format (on Mac, slightly different than running it on Windows) 2018-09-30 11:43:57 -07:00