# Difference Between URDF, SRDF, and SDF Skills for Robot Descriptions

> Understand URDF SRDF and SDF robot descriptions. Learn how text-to-cad generates XML for geometry motion planning and physics simulation serving diverse robotics needs.

- Repository: [earthtojake/text-to-cad](https://github.com/earthtojake/text-to-cad)
- Tags: comparison
- Published: 2026-08-01

---

**The text-to-cad repository provides three complementary generator skills that produce distinct XML descriptions—URDF for geometric and kinematic structure, SRDF for motion-planning semantics, and SDF for physics simulation—each serving different consumers in the robotics pipeline.**

The `earthtojake/text-to-cad` codebase automates robot modeling through specialized Python generator scripts located in `skills/<skill>/` directories. Understanding the **difference between URDF, SRDF, and SDF skills for robot descriptions** ensures you generate the correct artifacts for visualization, motion planning, or simulation workflows.

## URDF Skill: Geometric and Kinematic Structure

The **URDF skill** defines the foundational geometric and kinematic structure of a robot. It generates `<robot>.urdf` XML files containing links, joints, visual meshes, collision meshes, and inertial properties.

According to the source code in [`skills/urdf/references/urdf-workflow.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/urdf/references/urdf-workflow.md), this skill serves as the primary source of truth for robot geometry. Consumers include RViz visualization, `robot_state_publisher`, and simulation front-ends that require raw robot models.

To generate a URDF file, run the generator script from the repository root:

```bash
scripts/urdf path/to/robot_description.py

```

You can specify an explicit output path using the `-o` flag:

```bash
scripts/urdf path/to/robot_description.py -o out/robot.urdf

```

The command executes the generator defined in the URDF skill and automatically validates the output for structural consistency and missing meshes.

## SRDF Skill: Semantic Planning Information

The **SRDF skill** adds semantic information required by motion-planning frameworks like MoveIt. Unlike URDF, it does not define geometry but instead supplies planning groups, default joint poses, disabled collision pairs, and configuration metadata.

As documented in [`skills/srdf/references/srdf-workflow.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/srdf/references/srdf-workflow.md), the SRDF generator reads the previously generated URDF and enriches it with MoveIt-specific semantics. Typical consumers include MoveIt planners and the `move_group` node.

Generate the SRDF file using:

```bash
scripts/srdf path/to/robot_description.py

```

This command reads the URDF produced in the previous step and writes `<robot>.srdf` alongside it, incorporating planning groups and predefined poses essential for motion planning pipelines.

## SDF Skill: Simulation-Ready Descriptions

The **SDF skill** produces simulation-ready descriptions compatible with Ignition Gazebo. It contains the full robot model plus physics-related elements such as surface properties and contact sensors.

The generator, referenced in [`skills/sdf/references/sdf-workflow.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/sdf/references/sdf-workflow.md), can ingest the existing URDF or the underlying Python model to emit `<robot>.sdf` files suited for physics engines and simulation pipelines.

Generate the SDF file with:

```bash
scripts/sdf path/to/robot_description.py

```

This creates a complete simulation description that internalizes the URDF data while adding physics-specific parameters required by Ignition Gazebo.

## How the Skills Relate and Execute

### Source of Truth Architecture

All three skills originate from generator scripts living under `skills/<skill>/` directories. These Python generators serve as the **single source of truth**, making the output XML files derived artifacts rather than manually edited sources.

### Generation Flow

The execution follows a specific pipeline:

1. Run the URDF generator to produce the base geometric file
2. Run the SRDF generator to read the URDF and add motion-planning semantics  
3. Run the SDF generator to convert the model into simulation format

Each skill ships with validators that check generated XML for malformed joint definitions and structural inconsistencies, running automatically during generation.

### Consumer-Driven Usage

Different robotics tools consume these files distinctly:

- **Visualization tools** load the URDF directly from `models/`
- **Planning pipelines** load both URDF and SRDF files simultaneously
- **Simulators** load the SDF, which internally encapsulates the URDF data

## Viewing Generated Models

You can visualize any generated description using the CAD Viewer skill:

```bash
npm --prefix skills/cad-viewer run serve -- \
  --host 127.0.0.1 --dir $PWD/models --shutdown-after 1h

```

Open the viewer URL and append `?file=robot.urdf` or `?file=robot.sdf` to visualize the generated files. The viewer automatically discovers artifacts in the `models/` directory.

## Summary

- **URDF skill** generates geometric and kinematic XML for visualization and state publishing, defined in [`skills/urdf/references/gen-urdf.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/urdf/references/gen-urdf.md)
- **SRDF skill** adds MoveIt-compatible semantic groups and collision data, referenced in [`skills/srdf/references/gen-srdf.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/srdf/references/gen-srdf.md)
- **SDF skill** produces Ignition Gazebo-compatible simulation files with physics properties, documented in [`skills/sdf/references/gen-sdf.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/sdf/references/gen-sdf.md)
- Each skill validates output automatically and consumes the previous skill's artifacts in the generation pipeline
- Use `scripts/urdf`, `scripts/srdf`, and `scripts/sdf` commands to generate files from Python robot descriptions

## Frequently Asked Questions

### Do I need to generate all three files for every robot?

No. Generate only the files required by your specific pipeline. Use the **URDF skill** alone for basic visualization in RViz. Add the **SRDF skill** only if you are using MoveIt for motion planning. Generate the **SDF skill** output exclusively when running physics simulation in Ignition Gazebo.

### Which skill should I run first?

Always run the **URDF skill** first. The SRDF generator reads the generated URDF file to extract link and joint names for semantic grouping. The SDF generator can optionally read the URDF or the underlying Python model, but establishing the geometric baseline with URDF ensures consistency across all downstream artifacts.

### What validation checks are performed automatically?

Each generator runs validators that check for structural XML consistency, missing mesh references, malformed joint definitions, and invalid frame semantics. These validations execute automatically when you invoke `scripts/urdf`, `scripts/srdf`, or `scripts/sdf`, preventing malformed descriptions from reaching your visualization or simulation pipelines.

### Can I modify the generated XML files directly?

You should not edit the generated XML files manually. The Python generators in [`skills/urdf/references/gen-urdf.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/urdf/references/gen-urdf.md), [`skills/srdf/references/gen-srdf.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/srdf/references/gen-srdf.md), and [`skills/sdf/references/gen-sdf.md`](https://github.com/earthtojake/text-to-cad/blob/main/skills/sdf/references/gen-sdf.md) serve as the single source of truth. Modify the generator scripts or input Python descriptions instead, then regenerate the XML to ensure consistency across URDF, SRDF, and SDF outputs.