Commit Graph

434 Commits

Author SHA1 Message Date
Erwin Coumans
6160b52fd7 graphicsServer to workaround OpenGL issues on some servers. 2019-06-13 23:24:22 -07:00
Erwin Coumans
af5bfb4089 added Microtaur URDF file, with basic system identification
See https://www.youtube.com/watch?v=UmGnLgpEVTE
2019-05-21 22:33:16 -04:00
Chuyuan Fu
3be2ce0adf set softbody start position and orientation in pybullet 2019-05-03 11:56:13 -07:00
Chuyuan Fu
3fb0a7c19b add set starting position and orientation to softbody 2019-05-01 16:56:40 -07:00
erwincoumans
a929e8f2e5
Merge pull request #2203 from erwincoumans/master
implement stablePD control version of testLaikago,  fix getCameraImage in VR,  only report solver analytics if enabled using setPhysicsEngineParameter
2019-04-15 08:52:03 -07:00
erwincoumans
e97a7d77af only report solver analytics if enabled using setPhysicsEngineParameter(reportSolverAnalytics=1) 2019-04-14 18:20:20 -07:00
erwincoumans
5ff52e47d9 report constraint solver analytics data, currently for each island the number of solver iterations used and remaining residual error. 2019-04-11 22:19:02 -07:00
Jannik Vogel
4ca8b997f9 Reduce visibility of Bullet symbols in PyBullet
Avoids version conflicts in programs using PyBullet, which also link against Bullet libraries
2019-04-08 02:59:24 +02:00
erwincoumans
76918ca26d Merge remote-tracking branch 'bp/master' 2019-04-03 20:08:05 -07:00
erwincoumans
6951aaf26a implement PyBullet removeState command. Fixes Issue #2163
https://github.com/bulletphysics/bullet3/issues/2163
2019-04-03 20:06:40 -07:00
Chuyuan Fu
19f3ec8b80 fix conflut 2019-03-25 14:12:00 -07:00
Erwin Coumans
f725d1201d fix memory leak in PyBullet.calculateInverseKinematics when joint limits are provided
Fixes Issue #2164
2019-03-20 15:09:48 -07:00
erwincoumans
550f4c4785 expose maxJointVelocity through PyBullet.changeDynamics, this Fixes Issue #1890
bump up PyBullet to version 2.4.8
2019-03-11 10:12:38 -07:00
erwincoumans
a1f15ae01a Expose anisotropic friction, add snake demo. Simple snake slither locomotion from > 15 years ago, thanks to Michael Ewert @ Havok!
Visit http://www.snakerobots.com to see one of these in the wild
2019-03-11 10:12:38 -07:00
erwincoumans
4ea907aacf expose maxJointVelocity through PyBullet.changeDynamics, this Fixes Issue #1890
bump up PyBullet to version 2.4.8
2019-03-09 09:23:16 -08:00
erwincoumans
9408e4f2d0 Expose anisotropic friction, add snake demo. Simple snake slither locomotion from > 15 years ago, thanks to Michael Ewert @ Havok!
Visit http://www.snakerobots.com to see one of these in the wild
2019-03-07 21:13:00 -08:00
erwincoumans
4d711ed411 Merge remote-tracking branch 'origin/physx' into physx_clean 2019-02-28 17:52:59 -08:00
erwincoumans
8e1c1448ab Expose motor drive torque reporting for motors in spherical joints in getJointStateMultiDof. 2019-02-27 09:54:12 -08:00
erwincoumans
71b1191947 texture caching and geometry caching (PhysX) for much faster loading of many same objects, helps benchmarking/comparison.
add command-line args for PhysX (numCores=..., solver=tgs, )
2019-02-21 19:24:18 -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
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
erwincoumans
9bddca873c allow pybullet_envs.deep_mimic.testrl --arg_file run_humanoid3d_backflip_args.txt to perform a backflip. Can only backflip twice, then drops on ground.
this deepmimic is still very slow, due to slow mass matrix/inverse dynamics computation. once spherical motor drive is enabled, it should be fast(er)
move pd_controller_stable to pybullet_utils for easier re-use
add plane_transparent.urdf to pybullet_data
allow spacebar in keyboardEvents (Windows for now)
2019-02-10 20:56:31 -08: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
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
225db2e385 Merge remote-tracking branch 'bp/master' 2019-01-23 08:55:38 -08:00
erwincoumans
e02f82f172 fix some memory leaks in PyBullet.resetJointStateMultiDof and setJointMotorControlMultiDof
Fixes Issue 2065
2019-01-23 08:54:17 -08:00
Maxime Busy
b4eca192fb Parse physicsClientId before calling getPhysicsClient 2019-01-23 12:02:17 +01: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
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
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
Erwin Coumans
bded2968ea add PyBullet.rotateVector method
add missing walk humanoid3d_walk.txt
2018-11-19 10:10:33 -08:00
erwincoumans
9e99f5cdbc Expose PyBullet.calculateVelocityQuaternion, getAxisAngleFromQuaternion, getQuaternionFromAxisAngle, getDifferenceQuaternion
Add preparation for DeepMimic humanoid environment, replicating parts of https://github.com/xbpeng/DeepMimic
Loading humanoid.urdf and applying motion action: examples/pybullet/gym/pybullet_envs/mimic/humanoid.py
Loading MotionCapture data: examples/pybullet/gym/pybullet_envs/mimic/motion_capture_data.py
Little test: examples/pybullet/gym/pybullet_envs/mimic/humanoid_test.py
2018-11-16 17:29:03 -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
47b8b98a64 PyBullet: call the right method (although equivalent at the moment) 2018-10-30 22:16:13 -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
Erwin Coumans
2d224cf319 revert backward compabitility in API 2018-10-20 19:44:39 -07: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
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
a24c1436af state 2 of FileIO plugin: adding/removing FileIO types, search through all registered FileIO types.
(not enabled by default yet)
Example:
fileIO = p.loadPlugin("fileIOPlugin")
print("fileIO=",fileIO)
p.executePluginCommand(fileIO,"e:/develop/bullet3/data/plane.zip", [p.AddFileIOAction,p.ZipFileIO])
p.executePluginCommand(fileIO,"e:/develop/bullet3/data/test2.zip", [p.AddFileIOAction,p.ZipFileIO])
planeId = p.loadURDF("plane.urdf")
duckId = p.loadURDF("duck_vhacd.urdf",[0,0,1])
2018-10-11 14:39:31 -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
a1543714f1
Merge pull request #1919 from erwincoumans/master
btMultiBody: fix indexing issue causing wrong friction to be reported, remove obsolete BT_PYBULLET_GRPC and PYBULLET_EGL
2018-10-06 19:02:09 -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
Erwin Coumans
da2ee638ef remove obsolete BT_PYBULLET_GRPC and PYBULLET_EGL 2018-10-05 21:47:13 -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
erwincoumans
5bcd43711a PyBullet OpenGL/EGL hardware getCameraImage: use glViewport to reduce the glReadPixels calling cost dramatically for small images
PyBullet Allow OpenGL/EGL hardware to render segmentation mask. Use pybullet.ER_SEGMENTATION_MASK_OBJECT_AND_LINKINDEX or pybullet.ER_SEGMENTATION_MASK
PyBullet.removeBody fix indexing bug (use foundIndex, not i)
PyBullet bump up version to 2.2.3
2018-09-30 07:10:40 -07:00
Julian Viereck
219dfc757a Adding support for lateral friction to getContactPoints() 2018-09-24 10:03:43 -04:00
erwincoumans
ab8f16961e Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
2018-09-23 14:17:31 -07:00
erwincoumans
b73b05e9fb add getClosestPoints.py example.
allow to perform a getClosestPoints query with a collisionShape and world transform (position, orientation) that isn't part of the world.
(use createCollisionShape to create it)
add optional removeCollisionShape, for collision shapes only used in a query (and not used to create a body)
2018-09-22 14:18:21 -07:00