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
This commit is contained in:
Erwin Coumans
2018-05-23 13:26:00 +10:00
parent f5952a73e7
commit 77c332bd88
12 changed files with 189 additions and 16 deletions

View File

@@ -164,6 +164,7 @@ enum EnumChangeDynamicsInfoFlags
CHANGE_DYNAMICS_INFO_SET_FRICTION_ANCHOR = 512,
CHANGE_DYNAMICS_INFO_SET_LOCAL_INERTIA_DIAGONAL = 1024,
CHANGE_DYNAMICS_INFO_SET_CCD_SWEPT_SPHERE_RADIUS = 2048,
CHANGE_DYNAMICS_INFO_SET_CONTACT_PROCESSING_THRESHOLD = 4096,
};
struct ChangeDynamicsInfoArgs
@@ -183,6 +184,7 @@ struct ChangeDynamicsInfoArgs
double m_localInertiaDiagonal[3];
int m_frictionAnchor;
double m_ccdSweptSphereRadius;
double m_contactProcessingThreshold;
};
struct GetDynamicsInfoArgs
@@ -450,6 +452,8 @@ enum EnumSimParamUpdateFlags
SIM_PARAM_UPDATE_JOINT_FEEDBACK_MODE = 262144,
SIM_PARAM_UPDATE_DEFAULT_GLOBAL_CFM = 524288,
SIM_PARAM_UPDATE_DEFAULT_FRICTION_CFM = 1048576,
SIM_PARAM_UPDATE_SOLVER_RESIDULAL_THRESHOLD = 2097152,
SIM_PARAM_UPDATE_CONTACT_SLOP = 4194304,
};
enum EnumLoadSoftBodyUpdateFlags