跳到正文
cccskills
免费在 GitHub 公开

urdf

Create, edit, and validate URDF files describing robot structure. Check links, joints, coordinate frames, units, mesh placement, and mass properties, then use CAD Viewer to inspect the model and review each movable joint.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

URDF robot description authoring and validation. Use when creating, editing, inspecting, validating, or debugging `.urdf` files, robot links, joints, limits, inertials, visual/collision geometry, mesh references, frame conventions, or robot-description artifacts. Use the SRDF skill for MoveIt2 semantic groups and IK/path-planning semantics; use the CAD skill for STEP/STL/3MF/DXF/GLB outputs. Open and visually review existing URDF files in CAD Viewer.

查看安装方法

适用场景

  • Create a robot structure description
  • Debug joint positions and motion axes
  • Check mesh scale and placement
  • Validate mass properties and joint limits

包含的文件(10)

  • SKILL.md9.7 KB
  • agents/openai.yaml285 B
  • LICENSE1.0 KB
  • references/authoring-contract.md8.9 KB
  • references/design-ledger.md5.3 KB
  • references/frame-semantics.md3.5 KB
  • references/inertials.md4.9 KB
  • references/meshes.md4.0 KB
  • references/urdf-workflow.md5.6 KB
  • references/validation.md4.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

URDF

Provenance: maintained in earthtojake/text-to-cad. Use the installed local skill files as the runtime source of truth; the repository link is only for provenance and release review.

Use this skill for URDF robot-description outputs. Treat URDF work as constrained kinematic modeling, not just XML writing. The main correctness risks are frame placement, joint-axis semantics, unit consistency, mesh scale, and inertial data.

Setup

Run cadgen through uv, so this skill's commands share one installation, and its warm build daemon, with the CAD app's server:

  • cadgen below means uvx --no-config --managed-python --python 3.13 --from cadgen==0.7.26 cadgen
  • python below means uvx --no-config --managed-python --python 3.13 --from cadgen==0.7.26 python

The first run downloads that installation and the first snapshot its headless browser; later runs reuse both.

Core Rules

  1. The .urdf file is the source of truth. Author and edit URDF XML directly; do not build a Python generation pipeline for it. There is no gen_urdf() contract.
  2. Before writing or changing URDF XML, establish the robot's frame, joint, geometry, unit, and assumption ledger and embed it as a comment block at the top of the .urdf file. See references/design-ledger.md.
  3. Use URDF frame semantics exactly. Joint origins, link frames, joint axes, and visual/collision/inertial origins use different reference frames. See references/frame-semantics.md.
  4. Do not infer spatial transforms, mesh units, handedness, axes, or joint signs from vague prose. Use CAD transforms, dimensioned drawings, measured values, existing source data, or explicit documented assumptions.
  5. Never freehand numeric values that are the result of computation — inertia tensors, centers of mass, unit conversions across many links, mirrored transforms. Compute them: closed-form formulas for primitives, or a throwaway helper script for mesh-derived values. See references/inertials.md.
  6. For physical links, model inertial, visual, and collision separately when the target consumer needs them. Frame-only links may intentionally omit mass and geometry.
  7. Validate every created or modified .urdf with cadgen urdf validate before reporting completion. See references/validation.md.
  8. Helper scripts are allowed and encouraged for computation, but they are scaffolding, not the artifact's source of truth. For complex or genuinely parametric models it is reasonable to keep a model-local helper script on disk next to related source code (for example STEP generator sources) and note it in the ledger; this is optional, and the checked-in .urdf remains canonical.

Show the model

Show the user each file you create or change, and any they ask to see. Snapshots and validation don't replace this.

  • If your tools include cad_show (your host may prefix it), use it with the file's absolute path, and follow its description for when to call it again. cad_view reads what the user selected; cad_screenshot shows you what they see. Neither is a review of your own work.

  • Otherwise run the CAD Viewer, from any folder:

    cadgen viewer --host 127.0.0.1 --json --detach
    

    --detach returns once the viewer answers requests and leaves it running in the background: always pass it, since a foreground viewer never exits (and piping its output through tail can hide the URL for good). It starts this machine's one viewer, or reuses it. Read url from its one JSON line (never guess the port), and for each file return url?file=<its URL-encoded absolute path>. If it fails to launch, say so.

Review mesh scale and placement, then sweep every movable joint against the design ledger. A link alone does not complete the viewer sweep; report any checks you could not perform.

Workflow

  1. Identify the target .urdf file and its consumers: RViz, robot_state_publisher, Gazebo/Ignition, MoveIt, a real robot driver, or another simulator.
  2. Read or create the design ledger before editing frames, origins, axes, mesh scale, limits, or inertials. Keep the ledger as a comment block in the .urdf itself.
  3. Prepare mesh assets first when links reference meshes: one mesh per link, exported in that link's frame by the owning CAD/mesh workflow. See references/meshes.md.
  4. Author or edit the URDF XML directly, following references/authoring-contract.md for structure, ordering, and naming.
  5. Compute — never guess — inertials and other derived numbers. See references/inertials.md.
  6. Validate with cadgen urdf validate; fix findings and re-validate until clean.
  7. Run the verification recipe in references/validation.md: external tools when available (check_urdf), then a viewer review sweeping every joint.
  8. Report remaining assumptions, unchecked spatial data, and validation gaps.

Commands

Run cadgen as Setup defines it. cadgen doctor <skill-dir> reports the installation in use and checks that it is the one this skill pins — docs drift silently on another. Validation itself needs nothing beyond the Python standard library; only snapshots need the browser. Use cadgen <verb> --help for the complete current interface.

The validator shape is:

cadgen urdf validate path/to/robot.urdf
cadgen urdf validate path/to/robot.urdf --strict
cadgen urdf validate path/to/robot.urdf --json
cadgen urdf validate path/to/robot.urdf --packages robot_description=/path/to/pkg
cadgen urdf snapshot path/to/robot.urdf review.png

The validator collects all findings in one pass (severity, code, XML path) across XML structure, tree topology, joint semantics (limits, mimic, dynamics), geometry, mesh references, materials, inertial physics, and misspelled elements, and prints a summary. One run validates ONE file: --strict treats warnings as failures; --json prints one line of {"ok", "path", "issues": [{"severity", "code", "message", "element", "hint"}], "summary"}, where element is the XML path; --packages NAME=PATH resolves package:// mesh URIs and repeats for several roots. It exits nonzero if the target fails. Relative targets resolve from the current working directory; run from the workspace that owns the files.

Validation is a guardrail, not spatial proof: a URDF can pass every structural check while placing a joint in the wrong spot. The ledger and viewer sweep exist for that reason.

Snapshot Tool

cadgen urdf snapshot renders the robot to a PNG still, using the same shared CLI and headless browser runtime every rendering skill uses — so a snapshot matches what the CAD Viewer shows.

cadgen urdf snapshot path/to/robot.urdf review.png

It accepts .urdf only. Pose the robot with --joint-values — {joint: degrees} JSON, joints you do not name staying at their defaults, where the CAD Viewer opens the robot (the "jointValues" job field is the same thing in a packet). The snapshot draws the robot with the viewer's own scene, so it shows what the viewer shows, and a link mesh that cannot be loaded fails it rather than leaving the link out. Robots are authored in metres and are framed on the robot scene scale automatically.

A normal snapshot uses Solid mode and Light appearance. The display mode is solid (the default) or parts (each link its own colour), each at its own defaults; --grid draws the measuring grid under the robot, and --preview draws Preview's shared photographic scene instead, in perspective. Inline display JSON and JSON files are the Viewer's display object: mode, grid, appearance (light, the default, or dark), camera (projection and focal length) and clip. Top-level --camera and --joint-values remain active in every display mode. display.clip cuts the robot as the viewer's Clip does ({"clip":{"axis":"x","at":0.05}}, at in metres); exploded, and shaded, xray, hidden-line and wireframe, describe a STEP model's CAD edges and parts, and are refused by name here. A Quick Edit job from the viewer replays as it is: its jointValues, its selection.hide (the parts hidden in the Links panel, by their ids), its clip and annotation (cadgen snapshot --job <file>). Quick Edit supplies inline JSON or a .snapshot.json path; save inline JSON to a temporary file before using --job. Inspect supplied annotations before editing. Without annotations, the captured view is optional context; render it when useful to the request.

Link meshes are resolved relative to the description, so they must be present: an unhydrated Git LFS pointer fails as "No link mesh loaded for robot". Run git lfs checkout <mesh dir> first.

The grammar is cadgen urdf snapshot TARGET [OUT] [flags], the same one every format door uses. Use cadgen urdf snapshot --help for the complete current interface — the flags a robot cannot act on are absent from it, not refused by it.

References

  • Authoring contract (structure, ordering, golden skeleton): references/authoring-contract.md
  • Design ledger: references/design-ledger.md
  • Frame semantics: references/frame-semantics.md
  • Mesh preparation and references: references/meshes.md
  • Inertials (formulas, scripts, sanity gates): references/inertials.md
  • URDF edit workflow: references/urdf-workflow.md
  • Validation and verification recipe: references/validation.md

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Prepare files for printing on Bambu Lab printers by opening sliced files in Bambu Connect or unsliced models in Bambu Studio. The user selects the printer, checks the setup, and starts printing in the app.

中文简介正在准备中。当前显示英语简介。

  • Open a sliced file in Bambu Connect
  • Open an unsliced model in Bambu Studio
  • Prepare printing through Bambu Cloud or LAN
earthtojake/text-to-cad2.3万2026年10月22日 更新

cad

免费

Create and edit 3D parts and assemblies with adjustable dimensions using cadgen. Export STEP, STL, 3MF, or GLB files, inspect geometry, and open existing models in CAD Viewer for visual review.

中文简介正在准备中。当前显示英语简介。

  • Create a part from specified dimensions or a drawing
  • Revise part dimensions and assembly placements
  • Export models as STEP, STL, 3MF, or GLB
earthtojake/text-to-cad2.3万2026年10月22日 更新

Check mesh files for 3D printing by measuring geometry and comparing it with process-specific design limits. Get findings on wall thickness, overhangs, and supports, plus build orientation options and concrete redesign guidance.

中文简介正在准备中。当前显示英语简介。

  • Check whether a mesh meets printing design limits
  • Find thin walls and unsupported overhangs
  • Compare build orientations to reduce supports
earthtojake/text-to-cad2.3万2026年10月22日 更新

dfm

免费

Review part designs for sheet metal, CNC machining, or injection molding. Compare geometry measurements with applicable supplier or tooling limits, then document manufacturing concerns, suggested changes, and checks that still need evidence.

中文简介正在准备中。当前显示英语简介。

  • Review sheet metal bends and flat patterns
  • Check CNC tool access and internal corners
  • Review molding draft and undercuts
earthtojake/text-to-cad2.3万2026年10月22日 更新

dxf

免费

Create and update 2D DXF drawings from written requirements or CAD geometry using Python and build123d. Prepare cutting profiles and marking layers, check for open contours and duplicate geometry, and review drawings in CAD Viewer.

中文简介正在准备中。当前显示英语简介。

  • Create dimensioned gasket or panel drawings
  • Generate flat profiles from STEP geometry
  • Separate cutting and engraving geometry into layers
earthtojake/text-to-cad2.3万2026年10月22日 更新

Create a manufacturing drawing PDF from a part’s 3D geometry, with projected views, measured dimensions, hole callouts, and a title block. Rerun the drawing script after model changes to update the sheet.

中文简介正在准备中。当前显示英语简介。

  • Prepare a dimensioned drawing for manufacturing
  • Document hole sizes and machining requirements
  • Update drawings after changing a part model
earthtojake/text-to-cad2.3万2026年10月22日 更新

查看 earthtojake 的全部技能

报告此技能的问题