forgecad-verify-mujoco

Validates ForgeCAD MJCF exports in MuJoCo with dynamics, contacts, controls, and rendered evidence.

927|103|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/KoStard/forgecad-public-kit --skill forgecad-verify-mujoco
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forgecad-verify-mujoco
Source: https://github.com/KoStard/forgecad-public-kit/tree/main/skills/forgecad-verify-mujoco
Command: npx skills add https://github.com/KoStard/forgecad-public-kit --skill forgecad-verify-mujoco

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mujoco, pillow, and includes scripts (resource) components.

What problem does it solve?

A ForgeCAD MJCF export that loads without errors is not necessarily simulation-ready: joints may move the wrong direction, colliders may block motion, or the model may fall through the floor. This Skill enforces a rigorous verification workflow that loads the exported scene in MuJoCo, steps it under gravity, drives the intended actuators, inspects contact pairs, and renders visual evidence before declaring a model sim-ready.

Core Features & Use Cases

  • Numeric acceptance criteria: Assert signed post-settle joint travel in cycles or radians, final joint velocities, and root drop limits instead of loose "it moved" checks.
  • Contact pair inspection: Report the most frequent contact pairs to detect bad collider selection, filled bounding boxes, or floor/support failures.
  • Rendered evidence: Generate initial, settled, and driven frames plus a labeled camera azimuth preview grid so views actually show the functional mechanism.
  • Use Case: After exporting a drum-indexing mechanism with forgecad export mjcf, run the bundled verifier with --expect-drive-cycles drum_joint=-0.06:-0.03 to confirm the drive rotates the drum the expected amount and stops near zero velocity.

Quick Start

Ask the agent to export the model to MJCF and verify it in MuJoCo using this skill's mujoco_verify.py script with the appropriate actuator, watched joint, and expected drive-cycle range.

Frequently Asked Questions about forgecad-verify-mujoco

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify a ForgeCAD MJCF export in MuJoCo?

Export with forgecad export mjcf, then run the bundled mujoco_verify.py script against the output directory. It loads scene.xml, settles the model under gravity, drives actuators, and prints JSON with joint deltas, contact pairs, and rendered frames.

How to assert joint travel in a MuJoCo simulation test?

Use --expect-drive-cycles JOINT=MIN:MAX for signed revolute travel in turns, --expect-drive-delta for raw qpos units, and --expect-final-qvel for terminal velocity bounds. The script exits with code 2 and prints FAIL lines when any expectation is violated.

Why does my MuJoCo model fall through the floor?

Visual geoms exported with contype="0" conaffinity="0" cannot support anything; only collision geoms (usually group 3) generate contacts. Check that the model has real support or contact geometry rather than relying on visual meshes.

Why is a joint blocked or stuck during MuJoCo simulation?

List contact pairs during the stall and look for the pair repeating every step while joint velocity trends to zero. Common causes are bounding-box colliders that fill hollow regions or overly exact mesh collision on moving parts; use simplified physical proxy colliders instead.

Does a passing forgecad check simready mean the model is simulation-ready?

No. A successful export or simready check only confirms the file loads. Simulation readiness requires stepping the model in MuJoCo under gravity, driving the intended controls with numeric acceptance criteria, inspecting contacts, and reviewing rendered frames.