Commit Graph

299 Commits

Author SHA1 Message Date
Erwin Coumans
f3c11b6f31 add capsule, cylinder, plane, mesh support for pybullet.createCollisionShape
preparation to add links to pybullet.createMultiBody
2017-06-19 10:14:26 -07:00
Erwin Coumans
2e6f8c271e allow to disable/enable default keyboard shortcuts ('w', 'd' 's' etc) and default mouse picking
pybullet.getMouseEvents / b3RequestMouseEventsCommandInit
2017-06-17 13:29:14 -07:00
Erwin Coumans
3a826a5997 getCameraImage: use debug visualizer camera viewmatrix/projection matrix if possible (only if view/proj matrix is not provided) 2017-06-17 11:21:10 -07:00
Erwin Coumans
23b155a2b4 add getAABB.py example.
fix getAABB / b3RequestCollisionInfoCommandInit to use less stack memory
2017-06-16 18:10:10 -07:00
Erwin Coumans
bb8cfe3c9a pybullet.getAABB and getAPIVersion
fix btMultiBody::getLinkCollider
bump up Bullet C-API version
2017-06-15 19:46:27 -07:00
erwincoumans
3921ea88fa Merge pull request #1177 from YunfeiBai/master
Bug fix. Only return friction coefficient when there is a valid link …
2017-06-14 08:11:57 -07:00
Erwin Coumans
c84416d932 add debug view for getCameraImage (RGB, depth, segmentation mask) 2017-06-13 10:53:24 -07:00
yunfeibai
037043467a Bug fix. Only return friction coefficient when there is a valid link collider. 2017-06-08 18:59:11 -07:00
Erwin Coumans
46f2f3db4e implement 'mimic' joint constraint or 'gear' constraint for btMultiBody, add example in pybullet/examples/mimicJointConstraint.py 2017-06-07 16:22:02 -07:00
Erwin Coumans
60e3887456 enable btGearConstraint, expose 'changeDynamics' for gearRatio, only works for maximalCoordinates rigid bodies.
See examples\pybullet\examples\mimicJointConstraint.py
2017-06-07 13:44:34 -07:00
Erwin Coumans
d08f3e5f91 expose pybullet non-contact erp, friction erp and frictionAnchor, b3PhysicsParamSetDefaultNonContactERP / b3PhysicsParamSetDefaultFrictionERP / b3ChangeDynamicsInfoSetFrictionAnchor 2017-06-07 09:37:28 -07:00
Erwin Coumans
0c3a3cc466 pybullet.changeDynamicsInfo/b3ChangeDynamicsInfoSetContactStiffnessAndDamping expose contactStiffness/contactDamping 2017-06-07 08:37:42 -07:00
Erwin Coumans
a7aed37632 work on pybullet/C-API createMultiBody (still preliminary, only sphere/box collision shapes, no links/hierarchies yet, soon)
pybullet/C-API, expose linear/angular damping
fix some warnings (param name needs to be same in .h and .cpp)
fix potential startup threading issue (args were deleted in main thread while still possibly use in child thread)
fix for spinning/rolling friction in case of mixing maximal and reduced coordinate btMultiBody+btRigidBody
2017-06-04 22:04:16 -07:00
Erwin Coumans
b23cb1dd2c pybullet.createCollisionShape, createVisualShape, createMultiBody, programmatic creation using ProgrammaticUrdfInterface
(still preliminary, not ready for commit yet, see examples\pybullet\examples\createSphereMultiBodies.py)
2017-06-03 10:57:56 -07:00
yunfeibai
bfcbb339cf Merge remote-tracking branch 'upstream/master' 2017-06-02 18:26:04 -07:00
yunfeibai
0a29c8d9af Get debug visualizer camera yaw, pitch, dist, and target. 2017-06-02 18:24:51 -07:00
yunfeibai
f350a506a6 Enable rgba color update for TinyRender. 2017-06-01 23:32:26 -07:00
erwincoumans
3987bdd333 remove pose frame from SDF,
allow plane collision shape in SDF
load the Roboschool stadium.sdf in humanoid_knee_position_control.py
2017-06-01 20:13:39 -07:00
yunfeibai
e6d1a8cf97 Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -07:00
Erwin Coumans
87293e835c implement specular, URDF non-standard specular part (see sphere2.urdf) and SDF specular support.
pybullet.changeVisualShape(obUid,linkIndex,specularColor=[R,G,B]) and Bullet C-API b3UpdateVisualShapeSpecularColor
Bug fixes in b3ResourcePath::findResourcePath resolution.
add stadium.sdf and roboschool/models_outdoor/stadium assets https://github.com/openai/roboschool/tree/master/roboschool/models_outdoor/stadium
minor fixes to obj2sdf
2017-06-01 12:32:44 -07:00
erwincoumans
83f910711a Prepare/allow for non-Bullet2-based physics command processor in pybullet/Bullet-C-API
!!! Make sure to add examples/SharedMemory/PhysicsServerExampleBullet2.cpp to your build system, if needed
Bump up pybullet to version 1.0.9
2017-05-30 19:54:55 -07:00
Erwin Coumans
b645963879 expose pybullet changeDynamics(spinningFriction=..., rollingFriction=..., restitution=...)
Bullet C-API b3ChangeDynamicsInfoSetSpinningFriction/RollingFriction/Resitution
b3PhysicsParamSetRestitutionVelocityThreshold, / pybullet.setPhysicsEngineParameter restitutionVelocityThreshold:
if the velocity is below this threshhold, the restitution is zero (this prevents energy buildup at near-resting state)
pybullet restitution.py example.
2017-05-26 18:14:38 -07:00
Erwin Coumans
5e2599863d trackObject -> parentObject
trackLinkIndex -> parentLinkIndex
add example debugDrawItems.py
2017-05-24 09:06:15 -07:00
Erwin Coumans
9f7d7fecd5 more rendering fixes 2017-05-23 23:34:55 -07:00
Erwin Coumans
db008ab3c2 Improve debug text/line rendering, can be use to draw frames and text in local coordinate of an object / link.
example:
kuka = p.loadURDF("kuka_iiwa/model.urdf")
p.getNumJoints(kuka)
pybullet.addUserDebugLine([0,0,0],[0,0,0.1],[0,0,1],trackObjectUniqueId=2,trackLinkIndex=6)
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],trackObjectUniqueId=2,trackLinkIndex=6)
Also allow to render text using a given orientation (instead of pointing to the camera), example:
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],textOrientation=[0,0,0,1], trackObjectUniqueId=2,trackLinkIndex=6)
Add drawTexturedTriangleMesh, for drawing 3d text.
Expose readSingleInstanceTransformToCPU, to extract position/orientation from graphics index.
updateTexture: allow to not flip texels around up axis
2017-05-23 22:05:26 -07:00
Erwin Coumans
b19c209dbc The softbody/bunny test is very experimental and shouldn't be enabled in the example browser, unless USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD is defined. I fixed a few bugs that cause the hang. 2017-05-21 06:50:53 -07:00
Erwin Coumans
19295f2859 enable file caching, currently only for Wavefront .obj files. You can disable file caching using
pybullet.setPhysicsEngineParameter(enableFileCaching=0)
Allow VR camera tracking only using position tracking, no orientation tracking (use
pybullet.setVRCamera([posX,posY,posZ],trackObjectFlag=0 or pybullet.VR_CAMERA_TRACK_OBJECT_ORIENTATION)
2017-05-17 19:29:12 -07:00
Erwin Coumans
9c4a5f9336 update VR camera even if setRealTimeSimulation(0)
also update w component in setVRCameraState orientation
2017-05-17 16:29:30 -07:00
Erwin Coumans
ea10c6d335 fix issue when re-connecting to physics server, after removeBody. 2017-05-16 17:19:45 -07:00
Erwin Coumans
433d11d8cf Add a btIDEbugDraw::clearLines, helps multi-threaded rendering of lines (while updating those lines in a dynamics world in a different thread)
Expose COV_ENABLE_VR_RENDER_CONTROLLERS, to enable/disable rendering of controllers (and some frames) in VR
Expose COV_ENABLE_RENDERING to enable/disable rendering.
Fix some multi-threading issues (potential crashes), related to debug drawing/rendering in one thread, while changing the dynamics world/removing/resetSimulation in a different thread.
2017-05-16 12:19:03 -07:00
Erwin Coumans
f80838e989 expose the changeVisualShape RGBA color for TinyRenderer, OpenGL3 renderer. 2017-05-13 09:18:36 -07:00
Erwin Coumans
e2d596f4d0 remove visual shape from CPU/TinyRenderer with removeBody
(thanks to Jeff Bingham for reporting the bug!)
2017-05-12 20:24:10 -07:00
Oleg Klimov
d755513146 Rewrite collision filtering code 2017-05-11 12:59:11 +03:00
Erwin Coumans
53a82819a0 expose b3LoadMJCFCommandSetFlags / pybullet.pybullet_loadMJCF(fileName,flags=pybullet.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS) 2017-05-10 15:01:25 -07:00
yunfeibai
a587d4fec4 Use "change" instead of "reset" for changing dynamics info. 2017-05-09 10:44:33 -07:00
yunfeibai
98654a0cb4 Change dynamic to dynamics in dynamics info. 2017-05-09 10:31:28 -07:00
yunfeibai
5fe4c6bb5b Add API to get dynamic info. 2017-05-07 22:21:38 -07:00
Erwin Coumans
1f64a87abe Improve ChromeTraceUtil logging, allow filename to be specified.
Expose this ChromeTraceUtil  logging to C-API: start/statelogging and submitProfileTiming
pybullet.submitProfileTiming, and STATE_LOGGING_PROFILE_TIMINGS used in startStateLogging
added example for Python profileTiming.py and C++ b3RobotSimulatorClientAPI::submitProfileTiming
2017-05-04 17:51:40 -07:00
Erwin Coumans
a8bf53b494 fix error, m_userConstraintUIDGenerator should be m_data->m_userConstraintUIDGenerator 2017-05-04 13:52:02 -07:00
Erwin Coumans
7bf125e460 reset the m_userConstraintUIDGenerator to 1 after 'resetSimulation' 2017-05-04 13:28:09 -07:00
Erwin Coumans
61999ef789 b3ResizablePool: only remove a handle, if it is currently in-use
also remove user constraints, if removing a body
2017-05-04 13:14:24 -07:00
Erwin Coumans
fac3d6e3ca fix some compile errors after merge 2017-05-04 11:08:59 -07:00
Erwin Coumans
a7d08ca9d7 Merge remote-tracking branch 'bp/master' 2017-05-04 10:51:42 -07:00
erwincoumans
87a24dba84 Merge pull request #1091 from YunfeiBai/master
Add APIs to reset object mass, lateral friction coefficient, and to get user constraint id.
2017-05-04 17:47:33 +00:00
Erwin Coumans
a86f584824 more work towards removeBody for C-API/pybullet, work-in-progress. 2017-05-03 21:53:29 -07:00
yunfeibai
939d6ead32 Add API to reset lateral friction coefficient. 2017-05-03 21:47:53 -07:00
Erwin Coumans
6f7601966d fix issue ,don't iterate over [0..numBodyHandles], would fail once we allow 'removeBody'... 2017-05-03 11:23:01 -07:00
Erwin Coumans
2c8f65a2d0 move body handles in its own template class, for re-use. 2017-05-03 10:49:04 -07:00
Erwin Coumans
9fef6c1d66 Add C++ version VRGloveSimulatorMain example, using the serial library.
First run the App_PhysicsServer_SharedMemory_VR_vs2010.exe to run the VR server,
then run App_VRGloveHandSimulator. You likely need to tune the minV/maxV for each finger (check values using Arduino IDE Serial Monitor)
2017-05-01 22:35:33 -07:00
yunfeibai
4da2c076a7 Add API to reset mass. 2017-05-01 22:18:54 -07:00