Commit Graph

429 Commits

Author SHA1 Message Date
Erwin Coumans
7bd84740d7 PyBullet / BulletRobotics: prepare for pdControlPlugin and collisionFilterPlugin
Split examples/SharedMemory/b3RobotSimulatorClientAPI_NoGUI.* and move to examples/SharedMemory/b3RobotSimulatorClientAPI_NoGUI.cpp and examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp
2018-06-05 11:41:41 +10:00
erwincoumans
b6120e760a PyBullet.addUserData / getUserData / removeUserData / getUserDataId / getNumUserData / getUserDataInfo
See examples/pybullet/examples/userData.py how to use it. TODO: add to PyBullet Quickstart Guide.
Thanks to Tigran Gasparian for the contribution!
2018-06-02 13:40:08 -07:00
erwincoumans
cb6b7a7c38 PyBullet: expose flags to createMultiBody 2018-06-02 11:37:14 -07:00
erwincoumans
68ea22bfd0 undo git merge conflict mess-up with IK 2018-06-01 22:50:06 -07:00
erwincoumans
2d40a18315 picking shouldn't activate (wakeup) sleeping objects 2018-06-01 09:34:18 -07:00
erwincoumans
1dec33d44b move default linearslop to 0 2018-05-30 12:31:29 -07:00
Erwin Coumans
8ace9251aa pass by pointer instead of reference to satisy compiler 2018-05-23 14:22:22 +10:00
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
Yuchen Wu
f03ae5a857 Expose CFM parameters in PhysicsClient.
Add b3PhysicsParamSetDefaultGlobalCFM() and
b3PhysicsParamSetDefaultFrictionCFM().
2018-05-16 13:46:19 -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
Erwin Coumans
414b3ef9bb PyBullet urdfEditor improvements: saveUrdf mesh scale, fix incorrect index, add getCameraImage in examples/combineUrdf.py 2018-05-09 10:28:12 -07:00
Erwin Coumans
84b20bda80 don't use the URDF inertia element, unless flag CUF_USE_URDF_INERTIA is set, not for the diagonal and also not for the inertial frame shift. 2018-05-03 14:24:16 -07:00
Erwin Coumans
4a8ad1a54e fix posix memory release issues
fix compile problems on Mac OSX
reduce shared memory size on Mac (>512*1024 fails to allocate)
2018-05-02 15:39:16 -07:00
Jan Matas
b1f85268f0 Check for null 2018-04-30 19:01:53 +01:00
Jan Matas
21418934e0 Reset sparsesdf to free memory. 2018-04-25 16:17:28 +01:00
erwincoumans
391b0e4061
Merge pull request #1588 from GaborPuhr/Fix-#1582
Fix for #1582
2018-04-12 13:32:51 -07:00
Erwin Coumans
11008d8110 fixes, backwards compatibility 2018-04-12 09:28:30 -07:00
Erwin Coumans
0832d3fd22 disable velocity clamp (maxVelocity) in velocity control mode,
remove some warnings
2018-04-10 17:21:14 -07:00
erwincoumans
ec68290497 PyBullet createVisualShape/createVisualShapeArray: postpone visual shape conversion until we know the link inertial transform 2018-03-28 19:08:18 -07:00
yunfeibai
6b97e1e604 Expose API to set projective texture instead of using global. 2018-03-20 21:28:47 -07: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
d91a58e050 Merge remote-tracking branch 'bp/master' into pullRequest 2018-03-14 20:19:31 -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
erwincoumans
b62501d04d fix loadTexture for tinyrenderer 2018-03-12 19:40:13 -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
Erwin Coumans
b578361acf Use kF_UseGjkConvexCastRaytest by default for raycast in PyBullet (it is more robust/accurate, but a bit slower)
Use 10*EPSILON, as suggested in Gino's paper:
http://www.continuousphysics.com/ftp/pub/test/files/physics/papers/jgt04raycast.pdf
2018-03-07 14:51:51 -08:00
a
2348c6ba0a Fix for #1582 2018-03-05 23:05:22 +01:00
erwincoumans
73a4334e30 explicitly remove textures during resetSimulation
move glViewport to Win32Window
2018-02-21 23:22:16 -08:00
Erwin Coumans
b0984de046 preparation to replace glew by glad 2018-02-20 19:44:02 -08:00
erwincoumans
01f58f8f02 PyBullet: soft bodies are rendered, so we don't need to also render wireframes in regular mode.
Use glBufferSubData instead of glMapBuffer/glUnmapBuffer, much faster soft body vertex sync.
Don't use a separate btSoftBodyWorldInfo, use the existing one in btSoftMultiBodyDynamicsWorld.
2018-02-18 11:09:42 -08:00
erwincoumans
a6849de99c
Merge pull request #1555 from JanMatas/softBody-opengl-rendering
Implemented support for softbodies in OpenGL renderer
2018-02-18 10:48:46 -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
Jan Matas
817fb40fb5 Revert "Create a new pointer in btCollisionShape instead of just using userPtr."
This reverts commit d2d987a5ed.

After discussion, we decided to use userPtr.
2018-02-12 11:26:39 +00:00
Jan Matas
d2d987a5ed Create a new pointer in btCollisionShape instead of just using userPtr. 2018-02-08 13:49:36 +00:00
Jan Matas
82214eb99f Implemented support for softbodies in OpenGL renderer 2018-02-08 13:31:40 +00:00
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