mjcf#

Fully qualified name: isaacsim::asset::importer::mjcf

namespace mjcf#

Classes#

MJCFActuator

Actuator component for applying forces/torques to joints.

MJCFBody

Represents a rigid body in the MJCF model hierarchy.

MJCFClass

Class definition for setting default values for MJCF elements.

MJCFCompiler

Compiler settings that affect how the MJCF model is processed.

MJCFContact

Contact definition for collision filtering and contact parameters.

MJCFGeom

Geometry element for collision detection and physics simulation.

MJCFImporter

Main importer class for loading and converting MJCF models to USD format.

MJCFInertial

Inertial properties of a body in the MJCF model.

MJCFJoint

Represents a joint in the MJCF (MuJoCo XML Format) model.

MJCFMaterial

Material definition for visual appearance.

MJCFMesh

Mesh asset definition for 3D geometry.

MJCFSite

Site element for marking specific locations and orientations in the model.

MJCFTendon

Tendon element for creating cable-like constraints between bodies.

MJCFTexture

Texture asset definition for materials.

MJCFVisualElement

Base class for visual elements in MJCF models.

Enumerations#

Functions#

Vec3 Diagonalize(const Matrix33 &m, Quat &massFrame)

std::string GetAttr(const tinyxml2::XMLElement *c, const char *name)

void LoadActuator(tinyxml2::XMLElement *g, MJCFActuator &actuator, std::string className, MJCFActuator::Type type, std::map< std::string, MJCFClass > &classes)

void LoadAssets(tinyxml2::XMLElement *a, std::string baseDirPath, MJCFCompiler &compiler, std::map< std::string, MeshInfo > &simulationMeshCache, std::map< std::string, MJCFMesh > &meshes, std::map< std::string, MJCFMaterial > &materials, std::map< std::string, MJCFTexture > &textures, std::string className, std::map< std::string, MJCFClass > &classes, ImportConfig &config)

void LoadBody(tinyxml2::XMLElement *g, std::vector< MJCFBody * > &bodies, MJCFBody &body, std::string className, MJCFCompiler &compiler, std::map< std::string, MJCFClass > &classes, std::string baseDirPath)

void LoadCompiler(tinyxml2::XMLElement *c, MJCFCompiler &compiler)

void LoadContact(tinyxml2::XMLElement *g, MJCFContact &contact, MJCFContact::Type type, std::map< std::string, MJCFClass > &classes)

void LoadDefault(tinyxml2::XMLElement *e, const std::string className, MJCFClass &cl, MJCFCompiler &compiler, std::map< std::string, MJCFClass > &classes)

tinyxml2::XMLElement * LoadFile(tinyxml2::XMLDocument &doc, const std::string filePath)

void LoadFreeJoint(tinyxml2::XMLElement *g, MJCFJoint &joint, std::string className, MJCFCompiler &compiler, std::map< std::string, MJCFClass > &classes, bool isDefault)

void LoadGeom(tinyxml2::XMLElement *g, MJCFGeom &geom, std::string className, MJCFCompiler &compiler, std::map< std::string, MJCFClass > &classes, bool isDefault)

void LoadGlobals(tinyxml2::XMLElement *root, std::string &defaultClassName, std::string baseDirPath, MJCFBody &worldBody, std::vector< MJCFBody * > &bodies, std::vector< MJCFActuator * > &actuators, std::vector< MJCFTendon * > &tendons, std::vector< MJCFContact * > &contacts, std::vector< MJCFEqualityConnect * > &equalityConnects, std::map< std::string, MeshInfo > &simulationMeshCache, std::map< std::string, MJCFMesh > &meshes, std::map< std::string, MJCFMaterial > &materials, std::map< std::string, MJCFTexture > &textures, MJCFCompiler &compiler, std::map< std::string, MJCFClass > &classes, std::map< std::string, int > &jointToActuatorIdx, ImportConfig &config)

tinyxml2::XMLElement * LoadInclude(tinyxml2::XMLDocument &doc, const tinyxml2::XMLElement *c, const std::string baseDirPath)

void LoadInertial(tinyxml2::XMLElement *i, MJCFInertial &inertial)

void LoadJoint(tinyxml2::XMLElement *g, MJCFJoint &joint, std::string className, MJCFCompiler &compiler, std::map< std::string, MJCFClass > &classes, bool isDefault)

void LoadMesh(tinyxml2::XMLElement *m, MJCFMesh &mesh, std::string className, MJCFCompiler &compiler, std::map< std::string, MJCFClass > &classes)

void LoadSite(tinyxml2::XMLElement *s, MJCFSite &site, std::string className, MJCFCompiler &compiler, std::map< std::string, MJCFClass > &classes, bool isDefault)

void LoadTendon(tinyxml2::XMLElement *t, MJCFTendon &tendon, std::string className, MJCFTendon::Type type, std::map< std::string, MJCFClass > &classes)

std::string SanitizeUsdName(const std::string &src)

void applyArticulationAPI(std::unordered_map< std::string, pxr::UsdStageRefPtr > stages, pxr::UsdGeomXformable prim, const isaacsim::asset::importer::mjcf::ImportConfig config)

void applyCollisionGeom(pxr::UsdStageWeakPtr stage, pxr::UsdPrim prim, bool ConvexDecomposition)

void applyJointLimits(pxr::UsdPhysicsJoint jointPrim, const MJCFJoint *joint, const MJCFActuator *actuator, const int *axisMap, const int jointIdx, const int numJoints, const ImportConfig &config)

void applyPhysxJoint(pxr::UsdPhysicsJoint &jointPrim, const MJCFJoint *joint)

void applyRigidBody(std::unordered_map< std::string, pxr::UsdStageRefPtr > stages, pxr::UsdGeomXformable bodyPrim, const MJCFBody *body, const ImportConfig &config)

void createAndBindMaterial(pxr::UsdStageWeakPtr stage, pxr::UsdPrim prim, MJCFMaterial *material, MJCFTexture *texture, Vec4 &color, bool colorOnly, std::map< pxr::TfToken, pxr::SdfPath > &materialPaths)

pxr::UsdGeomXformable createBody(pxr::UsdStageWeakPtr stage, const std::string primPath, const Transform &trans, const ImportConfig &config)

pxr::UsdPhysicsJoint createD6Joint(pxr::UsdStageWeakPtr stage, const std::string jointPath, const Transform &poseJointToParentBody, const Transform &poseJointToChildBody, const std::string parentBodyPath, const std::string bodyPath, const ImportConfig &config)

pxr::UsdPhysicsJoint createFixedJoint(pxr::UsdStageWeakPtr stage, const std::string jointPath, const Transform &poseJointToParentBody, const Transform &poseJointToChildBody, const std::string parentBodyPath, const std::string bodyPath, const ImportConfig &config)

void createFixedRoot(std::unordered_map< std::string, pxr::UsdStageRefPtr > stages, const std::string jointPath, const std::string bodyPath)

void createJointDrives(pxr::UsdPhysicsJoint jointPrim, const MJCFJoint *joint, const MJCFActuator *actuator, const std::string axis, const ImportConfig &config)

pxr::UsdGeomMesh createMesh(pxr::UsdStageWeakPtr stage, const pxr::SdfPath path, const std::vector< pxr::GfVec3f > &points, const std::vector< pxr::GfVec3f > &normals, const std::vector< int > &indices, const std::vector< int > &vertexCounts)

pxr::UsdPrim createPrimitiveGeom(pxr::UsdStageWeakPtr stage, const std::string geomPath, const MJCFGeom *geom, const std::map< std::string, MeshInfo > &simulationMeshCache, const ImportConfig &config, std::map< pxr::TfToken, pxr::SdfPath > &materialPaths, bool importMaterials, const std::string rootPrimPath, bool collisionGeom)

pxr::UsdPrim createPrimitiveGeom(pxr::UsdStageWeakPtr stage, const std::string geomPath, const MJCFSite *site, const ImportConfig &config, bool importMaterials)

void createRoot(std::unordered_map< std::string, pxr::UsdStageRefPtr > stages, Transform trans, const std::string rootPrimPath, const isaacsim::asset::importer::mjcf::ImportConfig config)

pxr::UsdPrim createUsdMesh(pxr::UsdStageWeakPtr stage, const pxr::SdfPath path, Mesh *mesh, float scale, bool importMaterials, bool instanceable)

void getAngleAxisIfExist(tinyxml2::XMLElement *e, const char *aname, Quat &q, bool angleInRad)

void getEulerIfExist(tinyxml2::XMLElement *e, const char *aname, Quat &q, std::string eulerseq, bool angleInRad)

void getIfExist(tinyxml2::XMLElement *e, const char *aname, Vec3 &p)

void getIfExist(tinyxml2::XMLElement *e, const char *aname, float &p)

void getIfExist(tinyxml2::XMLElement *e, const char *aname, Quat &q)

void getIfExist(tinyxml2::XMLElement *e, const char *aname, bool &p)

void getIfExist(tinyxml2::XMLElement *e, const char *aname, Vec4 &p)

void getIfExist(tinyxml2::XMLElement *e, const char *aname, Vec3 &from, Vec3 &to)

void getIfExist(tinyxml2::XMLElement *e, const char *aname, Vec2 &p)

void getIfExist(tinyxml2::XMLElement *e, const char *aname, int &p)

void getIfExist(tinyxml2::XMLElement *e, const char *aname, std::string &s)

pxr::SdfPath getNextFreePath(pxr::UsdStageWeakPtr stage, const pxr::SdfPath &primPath)

void getZAxisIfExist(tinyxml2::XMLElement *e, const char *aname, Quat &q)

Quat indexedRotation(int axis, float s, float c)

void initPhysicsJoint(pxr::UsdPhysicsJoint &jointPrim, const Transform &poseJointToParentBody, const Transform &poseJointToChildBody, const std::string parentBodyPath, const std::string bodyPath, const float &distanceScale)

void setStageMetadata(pxr::UsdStageWeakPtr stage, const isaacsim::asset::importer::mjcf::ImportConfig config)

Structs#

ContactNode

A node in the contact graph representing collision relationships.

ImportConfig

Configuration settings for importing MJCF files.

MJCFEqualityConnect

Equality constraint that connects two bodies at a fixed relative position.

MeshInfo

Information about a mesh used in the MJCF model.

Mjcf

Interface for MJCF file import functionality.

Typedefs#