Skip to content
Beta.urdf@modelscript/urdf 8 diagnostic rules
Parser WASM GLR
Diagnostics 8 rules
DAE Arena Lowering
Simulation Native Solvers
Projections Modelica, SIMPACK, MSC Adams
Live ExampleArticulatedArm3Dof.urdf

ROS URDF 3-DOF Articulated Industrial Robot Arm

Robot kinematic chain with base pedestal, rotating waist turret, shoulder link, forearm link, inertial tensors, and revolute joint limits.

Morsel
Source (31 lines)
1<?xml version="1.0"?>
2<robot name="articulated_arm_3dof">
3  <link name="base_pedestal" />
4  <link name="waist_turret" />
5  <link name="upper_arm" />
6  <link name="forearm_wrist" />
7 
8  <joint name="j1_waist_yaw" type="revolute">
9    <parent link="base_pedestal" />
10    <child link="waist_turret" />
11    <origin xyz="0 0 0.32" rpy="0 0 0" />
12    <axis xyz="0 0 1" />
13    <limit lower="-3.14" upper="3.14" effort="180" velocity="2.5" />
14  </joint>
15 
16  <joint name="j2_shoulder_pitch" type="revolute">
17    <parent link="waist_turret" />
18    <child link="upper_arm" />
19    <origin xyz="0 0 0.24" rpy="0 0 0" />
20    <axis xyz="0 1 0" />
21    <limit lower="-1.57" upper="1.57" effort="140" velocity="2.2" />
22  </joint>
23 
24  <joint name="j3_elbow_pitch" type="revolute">
25    <parent link="upper_arm" />
26    <child link="forearm_wrist" />
27    <origin xyz="0 0 0.55" rpy="0 0 0" />
28    <axis xyz="0 1 0" />
29    <limit lower="-2.20" upper="2.20" effort="95" velocity="3.0" />
30  </joint>
31</robot>
URDF Kinematic Joint & Link Tree
articulated_arm_3dof base_pedestal waist_turret upper_arm forearm_wrist ↻ j1_waist_yaw ↻ j2_shoulder_pitch ↻ j3_elbow_pitch
Drag to pan · Click % to reset

URDF & Xacro Robot Kinematics ​

ModelScript provides first-class support for URDF (.urdf) and Xacro (.xacro), the robotics industry and ROS (Robot Operating System) standard for describing kinematic trees, inertial properties, visual geometry, and joint limits of robotic manipulators, humanoids, and autonomous vehicles.


Capabilities & Supported Formats ​

FormatExtensionDescription
Unified Robot Description Format.urdf, .xmlXML schema defining kinematic links, joints (revolute, continuous, prismatic, fixed, floating, planar), inertial parameters, collision bounds, and visual meshes.
Xacro Macro Template.xacroParametric XML preprocessor adding variables (<xacro:property>), mathematical expressions, and reusable macros (<xacro:macro>).

Key Architectural Features ​

  • Xacro Expansion & Parser:
    • Robust XML reader with automatic in-memory macro expansion (<xacro:macro>) and mathematical expression evaluation before parsing.
    • Generates strongly typed robot AST representation via parseUrdf().
  • Topological Kinematic Tree & Featherstone Algorithms:
    • Traverses joint-link connectivity starting from the root base link.
    • Implements Recursive Newton-Euler Algorithm (RNEA) for inverse dynamics: calculates required joint torques τ given joint positions q, velocities q˙, and accelerations q¨.
    • Implements Articulated-Body Algorithm (ABA) for forward dynamics: evaluates forward acceleration q¨=M(q)−1(τ−C(q,q˙)−g(q)) in O(N) operations.
  • Robotics Linters (M7501–M7508):
    • Detects dangling parent/child link references, disconnected kinematic sub-trees, inverted joint limits (lower > upper), zero joint axis vectors, missing inertia tags, and non-physical inertia tensors.
  • Multi-Target Projections:
    • Modelica MultiBody: Synthesizes Modelica.Mechanics.MultiBody robotic arms with joint friction and actuator controllers.
    • MSC Adams: Exports Adams .adm solver datasets.
    • SIMPACK: Generates SIMPACK .spck mechanisms.
    • 3D CAD: Projects robot geometry into CSG primitives and STEP visual meshes.

Command Line Interface (msx urdf) ​

bash
msx urdf <action> [files...] [options]
ActionDescriptionKey Options
lintRuns kinematic tree validation, joint limit checks, and inertia verification.—
rneaEvaluates inverse dynamics (RNEA) at test joint coordinates.--gravity
simulateSolves articulated robot forward dynamics into time-series trajectories.--stop-time, --step-size, --format=csv|json
to-modelicaGenerates standard Modelica.Mechanics.MultiBody robot system.--out=<file.mo>
to-adamsProjects robot mechanism into MSC Adams .adm solver dataset.--out=<file.adm>
to-simpackProjects robot mechanism into SIMPACK XML .spck model.--out=<file.spck>
to-usdProjects robot into OpenUSD / UsdPhysics scene or 64-byte aligned package.--usdz, --out=<file.usda|file.usdz>
to-daeLowers kinematic state equations directly into DAEBuilder arena.—

Examples ​

bash
# Simulate forward dynamics under gravity to CSV/JSON trajectory
msx simulate KukaIiwa14.urdf --stop-time=2.0 --step-size=0.01 -o trajectory.csv

# Evaluate inverse dynamics (RNEA) static hold torques
msx urdf rnea KukaIiwa14.urdf

# Check for inverted joint limits or dangling parent links
msx urdf lint MobileManipulator.urdf

# Convert robot description into standard Modelica 3.x
msx urdf to-modelica PandaArm.urdf --out=PandaArm.mo

# Export to OpenUSD / UsdPhysics digital twin scene
msx urdf to-usd PandaArm.urdf --out=PandaArm.usda

# Export to 64-byte aligned USDZ package for Apple Vision Pro & NVIDIA Omniverse
msx urdf to-usd PandaArm.urdf --usdz --out=PandaArm.usdz

# Export to MSC Adams for vehicle-mounted robot simulation
msx urdf to-adams RoverArm.urdf --out=RoverArm.adm

Interactive Ansatz Web Platform (UrdfViewer) ​

On Ansatz, .urdf, .sdf, and .xacro artifacts render directly in the interactive Robotics Mechanism Studio:

  • Kinematic Tree View: High-resolution vector schematic visualizing parent/child links and joint types with pan-and-zoom controls.
  • 3D Pose View: Real-time WebGPU/Three.js multibody viewport with forward kinematics joint angle sliders (qi∈[qmin,qmax]).
  • Dynamics & Linter: Pre-flight verification results (M7501–M7508) paired with an RNEA Gravity Hold Torques calculator reporting static equilibrium torques (τi [N⋅m]).
  • Polyglot Projections: One-click translation to Modelica 3.x or SIMPACK JSON, with direct export to the Ansatz Morsel visual playground.

Robotics Linters & Diagnostic Rules ​

8 rules5 error3 warning Run with msx lint

CodeRuleSeverityMessage
M7501unresolved-parent-linkerrorJoint '<jointName>' references non-existent parent link '<linkName>'.
M7502kinematic-looperrorClosed kinematic chain or duplicate parent detected at link '<linkName>' (URDF requires open tree).
M7503invalid-inertia-tensorerrorLink '<linkName>' defines non-physical inertia tensor: <reason>.
M7504invalid-joint-limitserrorJoint '<jointName>' defines invalid limits (lower: <lower> >= upper: <upper>).
M7505missing-mesh-resourcewarningVisual mesh URI '<uri>' on link '<linkName>' may not resolve at runtime.
M7506massless-linkwarningLink '<linkName>' has zero mass and no inertial specification.
M7507zero-norm-joint-axiserrorJoint '<jointName>' defines a zero-norm rotation/translation axis [0, 0, 0].
M7508continuous-joint-with-limitswarningJoint '<jointName>' is declared 'continuous' but specifies upper/lower limits.

Generated from languages/urdf/src/errors.ts. All languages →

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