Implementation:Google deepmind Mujoco USD Tokens
| Knowledge Sources | |
|---|---|
| Domains | USD, Token Registry |
| Last Updated | 2026-02-15 04:00 GMT |
Overview
Defines the complete set of TfToken constants used by the MjcPhysics USD schema library for attribute names, enum values, and prim type identifiers.
Description
tokens.cpp constructs the MjcPhysicsTokensType singleton which initializes all token strings used throughout the MjcPhysics USD schema. Each token is created as TfToken::Immortal to avoid destruction-order issues. The tokens cover a comprehensive range of MuJoCo concepts including actuator parameters (mjc:act, mjc:ctrlLimited, mjc:biasType), compiler settings (mjc:compiler:fuseStatic, mjc:compiler:angle), joint properties (mjc:damping, mjc:armature), integrator types (euler, implicit, implicitfast), solver types (cg, dense, elliptic), and contact parameters (mjc:condim).
Usage
Included by all MjcPhysics schema files (actuator, jointAPI, sceneAPI, tendon) and by the MuJoCo-to-USD conversion code to ensure consistent token usage across the entire USD export/import pipeline. The global MjcPhysicsTokens pointer provides access to all tokens.
Code Reference
Source Location
- Repository: Google_deepmind_Mujoco
- File: src/experimental/usd/mjcPhysics/tokens.cpp
- Lines: 1-402
Key Functions
MjcPhysicsTokensType::MjcPhysicsTokensType();
// Initializes tokens: affine, auto_, cg, convex, degree, dense, elliptic, euler, exact, ...
// mjc:act, mjc:actDim, mjc:actEarly, mjc:actLimited, mjc:armature, mjc:biasType, ...
// mjc:compiler:angle, mjc:compiler:autoLimits, mjc:compiler:fuseStatic, ...
// mjc:damping, mjc:dynPrm, mjc:condim, mjc:ctrl, mjc:ctrlLimited, ...
Import
#include <mujoco/experimental/usd/mjcPhysics/tokens.h>
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | Tokens are statically initialized at startup |
Outputs
| Name | Type | Description |
|---|---|---|
| MjcPhysicsTokens | MjcPhysicsTokensType* | Global singleton providing all MjcPhysics TfToken constants |