Skip to content
Preview.usd / .usda / .usdz@modelscript/usd
Parser WASM GLR
Diagnostics Typecheck
DAE Arena Lowering
Simulation Co-sim / Export
Projections DAE
Live ExampleRoboticManipulator.usda

OpenUSD UsdPhysics Articulated Robotic Manipulator Stage

Hierarchical UTF-8 ASCII OpenUSD stage defining rigid bodies, revolute joint limits, diagonal inertia tensors, and time-sampled joint trajectories.

Morsel
Source (52 lines)
1#usda 1.0
2(
3    defaultPrim = "IndustrialArm"
4    metersPerUnit = 1.0
5    upAxis = "Z"
6)
7 
8def Xform "IndustrialArm" (
9    kind = "assembly"
10)
11{
12    def Xform "base_link" (
13        prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"]
14    )
15    {
16        bool physics:rigidBodyEnabled = true
17        float physics:mass = 12.5
18        float3 physics:diagonalInertia = (1.2, 1.2, 0.6)
19 
20        def Cube "visual_base"
21        {
22            double size = 1.0
23            double3 xformOp:scale = (0.25, 0.25, 0.4)
24            uniform token[] xformOpOrder = ["xformOp:scale"]
25        }
26    }
27 
28    def Xform "link_1" (
29        prepend apiSchemas = ["PhysicsRigidBodyAPI", "PhysicsMassAPI"]
30    )
31    {
32        bool physics:rigidBodyEnabled = true
33        float physics:mass = 4.8
34        float3 physics:diagonalInertia = (0.45, 0.45, 0.12)
35 
36        double3 xformOp:translate.timeSamples = {
37            0.0: (0.0, 0.0, 0.4),
38            0.5: (0.1, 0.0, 0.6),
39            1.0: (0.2, 0.0, 0.7),
40        }
41        uniform token[] xformOpOrder = ["xformOp:translate"]
42    }
43 
44    def PhysicsRevoluteJoint "shoulder_joint"
45    {
46        rel physics:body0 = </IndustrialArm/base_link>
47        rel physics:body1 = </IndustrialArm/link_1>
48        uniform token physics:axis = "Z"
49        float physics:lowerLimit = -3.14159
50        float physics:upperLimit = 3.14159
51    }
52}
3D Digital Twin Prim Hierarchy & UsdPhysics DAG
3D DIGITAL TWIN & USDPHYSICS STAGE base_link j1: axis="Z" link_1 (4.8 kg) t = [0.0, 0.5, 1.0] s metersPerUnit = 1.0 | upAxis = "Z" OPENUSD STAGE SCENEGRAPH & APIS def Xform "IndustrialArm" assembly base_link PhysicsRigidBodyAPI | mass = 12.5 kg link_1 PhysicsMassAPI | timeSamples trajectory PhysicsRevoluteJoint "shoulder_joint" rel: base_link → link_1 | [−π, +π] rad lowerUsdToDae: Lowers to DAE arena
Drag to pan · Click % to reset

OpenUSD & UsdPhysics Digital Twins ​

ModelScript provides first-class support for OpenUSD (.usd, .usda, .usdz), the universal 3D scene description standard governed by the Alliance for OpenUSD (AOUSD). In ModelScript, OpenUSD serves as the high-fidelity 3D bridge connecting 1D/multibody physical simulation (Modelica, URDF, SIMPACK, Adams) and procedural 3D CAD (STEP, OpenSCAD) with photorealistic digital twins (NVIDIA Omniverse / Isaac Sim, Apple Vision Pro, Unreal Engine).


Capabilities & Supported Formats ​

FormatExtensionDescription
ASCII OpenUSD Stage.usdaHuman-readable UTF-8 scene description defining prim hierarchies, time-sampled attribute curves, and UsdPhysics schemas.
OpenUSD Zip Package.usdzZero-dependency, uncompressed ZIP archive with strict 64-byte payload data alignment for direct mmap streaming on iOS / visionOS / AR.
Binary / Mixed OpenUSD.usdGeneric USD container format routed automatically to ModelScript's streaming parser and 3D viewers.

Key Architectural Features ​

1. UsdPhysics Simulation Ingestion (lowerUsdToDae) ​

ModelScript can parse OpenUSD stages authored in external digital twin tools (NVIDIA Isaac Sim, Blender, Omniverse) and extract physics properties:

  • Rigid Bodies (PhysicsRigidBodyAPI, PhysicsMassAPI): Extracts scalar mass, center-of-mass offsets, and diagonal principal inertia tensors.
  • Kinematic Constraints: Resolves parent/child body targets (physics:body0, physics:body1), axis tokens, and limits for PhysicsRevoluteJoint, PhysicsPrismaticJoint, and PhysicsFixedJoint.
  • Linear DAE Lowering: Lowers generalized joint coordinates (q,q˙,τ) directly into ModelScript's WebAssembly Struct-of-Arrays DAEBuilder arena for simulation via CVODE/IDA or batched WebGPU integrators.

2. Time-Sampled Trajectory Animation ​

When forward dynamics are solved in ModelScript (from ROS URDF or Modelica MultiBody models), joint state trajectories are converted via forward kinematics into time-sampled USD animation curves:

c
double3 xformOp:translate.timeSamples = {
    0.0: (0.0, 0.0, 0.5),
    0.5: (0.1, 0.0, 0.7),
    1.0: (0.2, 0.0, 0.8),
}
quatf xformOp:orient.timeSamples = {
    0.0: (1.0, 0.0, 0.0, 0.0),
    0.5: (0.923, 0.382, 0.0, 0.0),
    1.0: (0.707, 0.707, 0.0, 0.0),
}
uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient"]

These files can be immediately opened in Apple Vision Pro, Quick Look, or NVIDIA Omniverse for dynamic simulation playback.

3. Procedural CAD & CSG Export ​

Watertight 2-manifold triangular meshes synthesized by @modelscript/cad (ManifoldSurfaceMesh) and OpenSCAD (@modelscript/scad) map directly to UsdGeomMesh:

  • Exact vertex points (point3f[] points)
  • Outward unit surface normals (normal3f[] normals)
  • Triangulated index buffers (int[] faceVertexIndices)
  • Diffuse material colors (color3f[] primvars:displayColor)
  • Part assembly transformations (matrix4d xformOp:transform)

Command Line Interface (msx) ​

bash
# Export URDF robot to human-readable ASCII OpenUSD with UsdPhysics schemas
msx urdf to-usd robot.urdf -o robot.usda

# Export to 64-byte aligned USDZ package for Apple Vision Pro & AR Quick Look
msx urdf to-usd robot.urdf --usdz -o robot.usdz

# Simulate robot forward dynamics and output trajectory
msx urdf simulate robot.urdf --stop-time=2.0 -o sim.json

Semantic Linter Rules (USD_*) ​

CodeRuleDescription
USD1002dangling-relationshipJoint or constraint targets a non-existent prim path in the stage (rel physics:body0).
USD1003invalid-up-axisStage upAxis metadata is not 'Y' or 'Z'.
USD1004non-positive-massRigid body declares a mass ≤0 (physics:mass).
USD1005invalid-inertiaDiagonal inertia tensor component is negative (physics:diagonalInertia).
USD1006inverted-joint-limitsJoint lower limit exceeds upper limit (physics:lowerLimit > physics:upperLimit).
USD1007invalid-axis-tokenJoint axis token is not 'X', 'Y', or 'Z' (physics:axis).

Open-Core under the GNU AGPL v3 License; Enterprise Edition (ee/) under the ModelScript Enterprise License. • Pricing • Trademark Policy