Examples
These files exercise the current HCDF 1.0 schema and Rust tooling. The excerpts below are
taken from the canonical files in the repository. Run both validation modes when adapting
an example: hcdf validate --xsd FILE for schema shape, then
hcdf validate FILE for semantic and cross-reference checks.
test-minimal.hcdf is retained
as a broad XSD syntax fixture. It intentionally contains unresolved external resources and an
invalid kinematic parent relationship, so it is not a complete loadable system.
A 25-component mobile humanoid description with dual arm chains, an optical compute backbone, base communication links and buses, power delivery, sensors, motors, joints, groups, named states, self-collision exclusions, gPTP, traffic classes, gate schedules, MACsec, and EEE policy. Its 20 root topology objects are 16 links, 2 buses, and 2 chains.
Configured guided-optical link
<link name="s32n79_to_thor_p0">
<description>Primary 25 Gb/s optical backbone link.</description>
<selected purpose="communication" carrier="guided-optical">
<rate><nominal value="25000000000" unit="bit/s"/></rate>
</selected>
<configuration>
<gptp-domain name="default" number="0">
<clock name="primary" kind="ordinary" gm-capable="true"
priority1="128" priority2="128">
<participant-ref network="s32n79_to_thor_p0" participant="s32n79"/>
</clock>
<clock name="secondary" kind="ordinary" gm-capable="false"
priority1="255" priority2="255">
<participant-ref network="s32n79_to_thor_p0" participant="agx-thor"/>
</clock>
<port-defaults log-sync-interval="-3" log-announce-interval="0"
log-pdelay-req-interval="0"
neighbor-prop-delay-threshold-ns="800"/>
</gptp-domain>
<macsec>
<policy name="must-secure" enforcement="must-secure"
cipher="ieee8021ae:gcm-aes-256" key-agreement="local:psk"
rekey-interval-ns="3600000000000" credential-store-ref="tpm0"/>
<default-policy>
<macsec-policy-ref network="s32n79_to_thor_p0" policy="must-secure"/>
</default-policy>
</macsec>
<eee default-mode="disabled"/>
</configuration>
<participant name="s32n79">
<endpoint><port-ref component="s32n79" port="e810_p0"/></endpoint>
</participant>
<participant name="agx-thor">
<endpoint><port-ref component="agx-thor" port="mgbe0"/></endpoint>
</participant>
</link>
A focused kinematic example for a parallelogram four-bar. Four joints form the spanning
structure and j_close declares the closure constraint. The separate
rocker_tip component places the child frame on the moving physical pin.
<joint name="j_close" type="revolute">
<parent comp="coupler"/>
<child comp="rocker_tip"/>
<origin xyz="0.30 0 0"/>
<axis xyz="0 0 1"/>
<limit lower="-2.6" upper="2.6"/>
<loop>
<predecessor>coupler</predecessor>
<successor>rocker_tip</successor>
<constraint-axes>1 1 1 1 1 0</constraint-axes>
</loop>
</joint>
A dual-arm system with a Jetson Thor, 14 Damiao drives, wrist cameras, two CAN topology buses, USB links, and a shared 48 V power bus. The current example selects the CAN profile and nominal bit rate and names each participant. It does not claim protocol-specific CAN identifiers or CAN-FD phase timing.
<bus name="can_right">
<description>Right OpenArm CAN-FD bus: Thor can0 controller and seven Damiao drives.</description>
<selected purpose="communication" carrier="electrical">
<profile id="hcdf:can"/>
<rate><nominal value="1000000" unit="bps"/></rate>
</selected>
<participant name="jetson_thor">
<endpoint><port-ref component="jetson_thor" port="can0"/></endpoint>
</participant>
<participant name="r_drive_1">
<endpoint><port-ref component="r_drive_1" port="can"/></endpoint>
</participant>
<participant name="r_drive_2">
<endpoint><port-ref component="r_drive_2" port="can"/></endpoint>
</participant>
</bus>
The full bus continues with drives 3 through 7.
A component-level example for the DM-J8009P-2EC installed at OpenArm joint 1. It combines motor ratings, joint limits, the external stop ring, exact GLB submeshes, an XT30 power connector, JST-GH CAN and UART connectors, individual pin representations, and exact functional-to-physical bindings.
<binding name="can_h_to_jst_gh_2_pin_1" fidelity="exact">
<functional>
<channel-ref component="base_j1_stator" port="can" channel="can_h"/>
</functional>
<physical>
<position-ref connector="can_connector" position="1">
<component-ref component="base_j1_stator"/>
</position-ref>
</physical>
</binding>
Download the self-contained HCDFZ bundle | View the HCDF source
A compact electronic system covering a GMSL2 conducted-RF link, DShot, inverted-UART SBUS, EtherCAT and FSoE, an APA102 chain, a BLE link, and a WiFi infrastructure star. Conducted and radiated ports are bridged by an explicit antenna.
<antenna name="wifi0">
<conducted-port component="compute" port="wifi0-feed"/>
<radiated-port component="compute" port="wifi0"/>
</antenna>
<star name="wifi_infrastructure">
<description>WiFi infrastructure network with the access point as coordinator.</description>
<selected purpose="communication" carrier="radiated-rf">
<rf>
<channel>
<numbered number="36">
<center-frequency><nominal value="5180000000" unit="Hz"/></center-frequency>
<bandwidth><nominal value="20000000" unit="Hz"/></bandwidth>
</numbered>
</channel>
</rf>
</selected>
<coordinator>
<participant-ref network="wifi_infrastructure" participant="ap"/>
</coordinator>
<participant name="ap">
<endpoint><port-ref component="ap" port="wifi0"/></endpoint>
</participant>
<participant name="compute">
<endpoint><port-ref component="compute" port="wifi0"/></endpoint>
</participant>
</star>
test-minimal.hcdf exercises many structural, sensor, actuator, energy, and
connectivity particles for schema testing. It passes the core XSD, but it is not a
semantically valid standalone robot: one component has multiple kinematic parents and
the fixture references resources that are not deployed with it.