Expose 'flags' option for loadURDF, to allow customization of the URDF loading process while maintaining backward compatibility.

For example: URDF_USE_INERTIA_FROM_FILE flag. By default, URDF2Bullet will re-compute the inertia tensor based on mass and volume, because most URDF files have bogus Inertia values.
This commit is contained in:
Erwin Coumans
2017-03-27 08:30:20 -07:00
parent d78909aef9
commit 4911916937
9 changed files with 44 additions and 13 deletions

View File

@@ -79,6 +79,7 @@ enum EnumUrdfArgsUpdateFlags
URDF_ARGS_INITIAL_ORIENTATION=4,
URDF_ARGS_USE_MULTIBODY=8,
URDF_ARGS_USE_FIXED_BASE=16,
URDF_ARGS_HAS_CUSTOM_URDF_FLAGS = 32
};
@@ -89,6 +90,7 @@ struct UrdfArgs
double m_initialOrientation[4];
int m_useMultiBody;
int m_useFixedBase;
int m_urdfFlags;
};
struct MjcfArgs