Robot Description Framework (RDF) -- capability-first robot descriptions for Defined Robotics.
An RDF file describes a robot in terms of its hardware modules, capabilities, and (optionally) physical geometry. The defined-rdf Python package provides Pydantic models, a YAML parser, and a capability registry.
pip install -e ".[dev]"from defined_rdf.parser import load
from defined_rdf.registry import CapabilityRegistry
robot = load("examples/defined_mvp.rdf.yaml")
registry = CapabilityRegistry(robot)
print(registry.list_types()) # ['differential_drive', 'wheel_encoders', 'lidar_2d', 'rgb_camera']
print(registry.has("lidar_2d")) # True
print(registry.check_requirements(["differential_drive", "depth_camera"]))
# (False, ['depth_camera'])pytest- Getting started -- writing and loading RDF files
- Schema reference -- full field reference
- JSON Schema -- machine-readable schema (generated from Pydantic models)
To regenerate the JSON Schema:
python -c "from defined_rdf.models import Robot; import json; print(json.dumps(Robot.model_json_schema(), indent=2))" > schema/robot.rdf.schema.json