expose local inertia diagonal in C-API, PyBullet, through the 'getDynamicsInfo'

render the inertia boxes in examples/pybullet/examples/quadruped.py and examples/pybullet/examples/reset_dynamic_info.py
fix an issue where the original margin (0.04) was used to compute the inertia, instead of latest margin
This commit is contained in:
erwincoumans
2017-12-20 14:54:32 -08:00
parent ecba966890
commit eb35cba740
7 changed files with 150 additions and 20 deletions

View File

@@ -210,6 +210,10 @@ enum JointType {
eGearType=6
};
enum b3RequestDynamicsInfoFlags
{
eDYNAMICS_INFO_REPORT_INERTIA=1,
};
enum b3JointInfoFlags
{
@@ -266,7 +270,7 @@ struct b3BodyInfo
struct b3DynamicsInfo
{
double m_mass;
double m_localInertialPosition[3];
double m_localInertialDiagonal[3];
double m_lateralFrictionCoeff;
};