PyBullet:

expose pybullet.changeDynamics(sleepThreshold), default 0.05, for both useMaximalCoordinates=False and True
When the dot(vel,vel) < sleepThreshold for longer than 2 seconds (this timeout is hard coded) objects that have the ACTIVATION_STATE_ENABLE_SLEEPING enabled with be deactivated
Example:
p.changeDynamics(ob, -1, activationState=p.ACTIVATION_STATE_ENABLE_SLEEPING, sleepThreshold=0.05)
This commit is contained in:
erwin coumans
2021-04-20 11:29:27 -07:00
parent fd154cee8f
commit e58e5bdf95
8 changed files with 113 additions and 7 deletions

View File

@@ -156,7 +156,8 @@ extern "C"
B3_SHARED_API int b3ChangeDynamicsInfoSetJointLimit(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueId, int linkIndex, double jointLowerLimit, double jointUpperLimit);
B3_SHARED_API int b3ChangeDynamicsInfoSetJointLimitForce(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueId, int linkIndex, double jointLimitForce);
B3_SHARED_API int b3ChangeDynamicsInfoSetDynamicType(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueId, int linkIndex, int dynamicType);
B3_SHARED_API int b3ChangeDynamicsInfoSetSleepThreshold(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueId, double sleepThreshold);
B3_SHARED_API int b3ChangeDynamicsInfoSetLateralFriction(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueId, int linkIndex, double lateralFriction);
B3_SHARED_API int b3ChangeDynamicsInfoSetSpinningFriction(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueId, int linkIndex, double friction);