Examples

Complete HCDF files demonstrating the format's capabilities, from a full 19-device humanoid system to a minimal test file that exercises every element type. Click a section header to expand the code. Large examples show curated excerpts highlighting key features.


Humanoid Mobile Base 2297 lines +

A 19-device humanoid system with dual 802.3dm arms, S32N79 central controller with integrated TSN switch and Intel E810 25G uplinks, AGX Thor for perception/ML, S32J100 base zone controller, SPAD lidars, Cubtek 4D radar, ZLAC8015D differential drive, and MR-BMS771 battery management. 5 separate networks: backbone, left-arm, right-arm, base, power.

Compute component with integrated TSN switch

<comp name="s32n79" role="compute">
  <description>NXP S32N79 — central motion control, CNC agent, integrated TSN switch.
    Intel E810 on PCIe for 25G uplink to AGX Thor.</description>
  <board>nxp-s32n79-evb</board>
  <inertial>
    <mass>0.8</mass>
    <com>0 0 0</com>
  </inertial>

  <!-- Integrated TSN switch fabric: XFI + QXGMII ports are bridged -->
  <switch chip="s32n79-integrated">
    <port name="xfi_left" iface="swp0" type="ethernet">
      <capabilities>
        <speed-tx unit="Mbps">100</speed-tx>
        <speed-rx unit="Mbps">10000</speed-rx>
        <standard>802.3dm</standard>
        <phy role="master"/>
        <tsn>
          <gptp hw-timestamping="true" gm-capable="true"/>
          <qbv traffic-classes="8" hw-queues="8" max-gcl-entries="512"/>
          <cbs/>
          <preemption min-fragment-size="64"/>
          <psfp max-filters="256" max-gates="256" max-meters="128"/>
          <frer seq-encoding="r-tag"/>
        </tsn>
        <macsec><cipher>gcm-aes-128</cipher></macsec>
        <eee supported="true"/>
      </capabilities>
    </port>
    <!-- ... additional switch ports ... -->
  </switch>
</comp>

Revolute joints and kinematic groups

<joint name="l_shoulder_yaw" type="revolute">
  <parent comp="torso"/>
  <child comp="mcn1-l"/>
  <origin xyz="0 0.18 0.25" rpy="0 0 0"/>
  <axis xyz="0 0 1"/>
  <limit lower="-2.96" upper="2.96" effort="50" velocity="3.14"/>
  <dynamics damping="0.5" friction="0.1"/>
</joint>

<group name="left_arm" type="kinematic-chain">
  <description>Left arm kinematic chain (shoulder to wrist)</description>
  <joint ref="l_shoulder_yaw"/>
  <joint ref="l_elbow"/>
  <joint ref="l_wrist_pitch"/>
</group>

<group name="left_manipulation">
  <description>Left arm + hand for manipulation tasks</description>
  <group ref="left_arm"/>
  <group ref="left_hand"/>
</group>

802.3dm daisy-chain network with camera spur

<network name="left-arm">
  <description>Left arm 802.3dm daisy-chain: S32N79 XFI -> MCN1-L -> MCN2-L
    -> MCN3-L -> MCN4-L, camera spur at MCN3-L</description>

  <chain name="left-arm-chain" type="802.3dm" mode="switched">
    <vlan id="10" pcp="5"/>
    <macsec policy="must-secure" cipher="gcm-aes-128"
            key-agreement="psk" key-ref="arm-left-keys"/>
    <hop device="s32n79" port="xfi_left" role="root"/>
    <hop device="mcn1-l" ingress="eth0" egress="eth1"/>
    <hop device="mcn2-l" ingress="eth0" egress="eth1"/>
    <hop device="mcn3-l" ingress="eth0" egress="eth1">
      <spur device="cam-l" port="eth0" via="eth2">
        <description>Left wrist stereo camera (~7 Gbps upstream)</description>
        <vlan id="20" pcp="3"/>
      </spur>
    </hop>
    <hop device="mcn4-l" ingress="eth0" role="tail"/>
  </chain>

  <gptp domain="1">
    <clock device="s32n79" port="xfi_left"
           gm-capable="true" priority1="128" priority2="128"/>
    <clock device="mcn1-l" port="eth0"
           gm-capable="false" priority1="255" priority2="255"/>
    <!-- ... -->
  </gptp>

  <schedule name="arm-chain-1ms" cycle-time-us="1000">
    <gate tc-mask="0x80" duration-us="20"/>
    <gate tc-mask="0x60" duration-us="80"/>
    <gate tc-mask="0x10" duration-us="50"/>
    <gate tc-mask="0x0F" duration-us="850"/>
  </schedule>

  <macsec policy="must-secure" cipher="gcm-aes-128" key-agreement="psk">
    <key-store type="secure-element" ref="se051"/>
  </macsec>
</network>

Named states and self-collision

<state name="home" default="true">
  <description>Default home position — arms at sides, elbows slightly bent</description>
  <joint-position joint="l_shoulder_yaw" value="0"/>
  <joint-position joint="l_elbow" value="0.5"/>
  <joint-position joint="l_wrist_pitch" value="0"/>
  <joint-position joint="r_shoulder_yaw" value="0"/>
  <joint-position joint="r_elbow" value="0.5"/>
  <joint-position joint="r_wrist_pitch" value="0"/>
</state>

<self-collision-disable>
  <pair comp1="torso" comp2="mcn1-l" reason="adjacent"/>
  <pair comp1="mcn1-l" comp2="mcn2-l" reason="adjacent"/>
  <pair comp1="mcn1-l" comp2="mcn1-r" reason="unreachable"/>
  <pair comp1="chassis" comp2="torso" reason="adjacent"/>
  <pair comp1="chassis" comp2="s32n79" reason="mounted"/>
  <!-- ... -->
</self-collision-disable>

Key features:

  • 19 components across compute, actuator, sensor, and structural roles
  • 5 networks: 25G backbone, dual 802.3dm arm chains, base zone with CAN-FD, power bus
  • 802.3dm daisy-chains with camera spurs for asymmetric bandwidth (10G up / 100M down)
  • gPTP time synchronization per network domain
  • Qbv gate schedules with 1ms cycle for deterministic motion control
  • Kinematic groups: left/right arms, end-effectors, manipulation, locomotion
  • Named states: home, transport
  • Self-collision disable with reasons: adjacent, mounted, unreachable

View full file on GitHub

Drone Quadrotor 947 lines +

A quadrotor drone with NavQ95 flight controller (NXP i.MX 95), 4x AM32 ESCs with 2212-920KV brushless motors and propellers, MR-MCXN-T1 sensor boards (RTK GNSS, optical flow, IMU, magnetometer, barometer), MIPI-CSI camera, LiPo battery, and power distribution board. Includes ROS 2 and Gazebo extension blocks.

Thrust motor with propeller surface

<comp name="motor_fl" role="actuator">
  <description>2212-920KV brushless motor with 9x4.5 propeller — front-left (CCW)</description>
  <inertial><mass>0.055</mass></inertial>
  <port name="sig_in" type="SIGNAL">
    <capabilities>
      <protocol>3-phase-BLDC</protocol>
      <connector>3-pin bullet</connector>
    </capabilities>
  </port>
  <motor name="prop_fl" type="thrust">
    <voltage unit="V" nominal="14.8" max="17.4"/>
    <current unit="A" continuous="15" peak="25"/>
    <velocity-constant unit="RPM/V">920</velocity-constant>
    <max-speed unit="rpm">13616</max-speed>
    <thrust-axis>0 0 1</thrust-axis>
    <max-thrust unit="N">15</max-thrust>
    <control-modes>
      <mode>pwm</mode>
      <mode>velocity</mode>
    </control-modes>
  </motor>
  <surface name="prop">
    <prop>
      <diameter unit="in">9</diameter>
      <pitch unit="in">4.5</pitch>
      <blades>2</blades>
      <direction>CCW</direction>
    </prop>
  </surface>
</comp>

IMU sensor with noise model and FIFO

<sensor name="imu0" update-rate="3200">
  <inertial type="accel_gyro">
    <driver name="icm45686">
      <axis-align x="X" y="Y" z="Z"/>
    </driver>
    <accel>
      <range unit="g">16</range>
      <resolution unit="mg">0.488</resolution>
      <odr unit="Hz">3200</odr>
      <bandwidth unit="Hz">1600</bandwidth>
      <fifo depth="256" watermark="8"/>
      <noise type="gaussian">
        <mean>0</mean>
        <stddev>0.003</stddev>
        <bias-mean>0.01</bias-mean>
        <bias-stddev>0.001</bias-stddev>
      </noise>
    </accel>
    <gyro>
      <range unit="dps">2000</range>
      <resolution unit="dps">0.061</resolution>
      <odr unit="Hz">3200</odr>
      <bandwidth unit="Hz">1600</bandwidth>
      <fifo depth="256" watermark="8"/>
      <noise type="gaussian">
        <mean>0</mean>
        <stddev>0.01</stddev>
        <bias-mean>0.005</bias-mean>
        <bias-stddev>0.0005</bias-stddev>
      </noise>
    </gyro>
  </inertial>
</sensor>

ROS 2 extension (topic mapping)

<extension domain="org.ros2" version="1.0">
  <topic-map>
    <topic sensor="imu0" name="/imu/data"
           type="sensor_msgs/msg/Imu" qos="sensor_data"/>
    <topic sensor="mag0" name="/mag/data"
           type="sensor_msgs/msg/MagneticField" qos="sensor_data"/>
    <topic sensor="baro0" name="/baro/data"
           type="sensor_msgs/msg/FluidPressure" qos="sensor_data"/>
    <topic sensor="gnss0" name="/gnss/fix"
           type="sensor_msgs/msg/NavSatFix" qos="sensor_data"/>
    <topic sensor="optical_flow0" name="/optical_flow"
           type="synapse_msgs/msg/OpticalFlow" qos="sensor_data"/>
    <topic sensor="camera0" name="/camera/image_raw"
           type="sensor_msgs/msg/Image" qos="sensor_data"/>
    <topic motor="prop_fl" name="/esc/fl/command"
           type="actuator_msgs/msg/MotorCommand" qos="reliable"/>
  </topic-map>
</extension>

Gazebo extension (simulation plugins)

<extension domain="org.gazebosim" version="1.0">
  <physics>
    <engine>ode</engine>
    <max-step-size>0.001</max-step-size>
    <real-time-factor>1.0</real-time-factor>
  </physics>
  <plugin name="aerodynamics" filename="libAerodynamicsPlugin.so">
    <link>frame</link>
    <air-density>1.225</air-density>
    <forward-drag-coefficient>0.05</forward-drag-coefficient>
    <upward-drag-coefficient>0.1</upward-drag-coefficient>
  </plugin>
  <plugin name="motor_model" filename="libMotorModelPlugin.so">
    <motor>prop_fl</motor>
    <turning-direction>ccw</turning-direction>
    <time-constant-up>0.0125</time-constant-up>
    <time-constant-down>0.025</time-constant-down>
    <rotor-drag-coefficient>0.00025</rotor-drag-coefficient>
    <rolling-moment-coefficient>1e-6</rolling-moment-coefficient>
  </plugin>
</extension>

CAN bus and power distribution networks

<network name="esc-bus">
  <description>CAN bus connecting NavQ95 to all four ESCs for DShot motor commands</description>
  <bus name="esc_can" type="CAN" topology="daisy-chain">
    <bitrate>1000000</bitrate>
    <protocol>DShot</protocol>
    <participant device="navq95" port="can0" role="controller"
                 position="0" id="0x01" terminator="true"/>
    <participant device="esc_fl" port="can0" role="sink"
                 position="1" id="0x11"/>
    <participant device="esc_fr" port="can0" role="sink"
                 position="2" id="0x12"/>
    <participant device="esc_rl" port="can0" role="sink"
                 position="3" id="0x13"/>
    <participant device="esc_rr" port="can0" role="sink"
                 position="4" id="0x14" terminator="true"/>
  </bus>
</network>

Key features:

  • Thrust motor type with propeller specs (diameter, pitch, blade count, rotation direction)
  • Multi-constellation RTK GNSS with accuracy specs and PPS
  • Camera with MIPI-CSI, intrinsics, data output bandwidth, H.265 compression
  • Battery with LiPo chemistry, cell configuration, energy/capacity, discharge rate
  • ROS 2 extension: sensor-to-topic mapping with QoS profiles
  • Gazebo extension: physics engine, aerodynamics plugin, motor model plugin
  • Star-topology power distribution: battery to PDB to ESCs and avionics

View full file on GitHub

Minimal Test 353 lines +

A compact test file that exercises every major element type in a single 2-component system: switch with TSN/MACsec/EEE ports, CAN/SIGNAL/POWER ports, IMU with noise model, ToF sensor with dual FOVs, encoder, hall effect, thermistor, BLDC motor with full electrical specs, wheel surface, joint with dynamics, network with link/bus/chain/gPTP/schedule/MACsec, transmission, material, and include.

<?xml version="1.0"?>
<hcdf version="1.0">

  <!-- Comp 1: board with switch, sensors, motor, surface, antenna, port -->
  <comp name="test-board" role="actuator">
    <description>Test component exercising all major child elements</description>

    <inertial>
      <mass>0.5</mass>
      <com>0 0 0.005</com>
      <inertia>1.2e-5 0 0 1.1e-5 0 2.0e-5</inertia>
    </inertial>

    <visual name="board">
      <pose>0 0 0 0 0 0</pose>
      <model uri="models/test-board.glb" sha="abc123def456"/>
    </visual>

    <collision name="board_col">
      <pose>0 0 -0.005 0 0 0</pose>
      <geometry>
        <box><size>0.048 0.044 0.012</size></box>
      </geometry>
      <surface>
        <friction static="0.6" dynamic="0.4"/>
        <restitution>0.2</restitution>
      </surface>
    </collision>

    <frame name="sensor_origin" relative-to="test-board">
      <description>Sensor reference frame</description>
      <pose>0 0 0.01 0 0 0</pose>
    </frame>

    <switch chip="test-switch">
      <port name="eth0" iface="swp0" type="ethernet">
        <capabilities>
          <speed-tx unit="Mbps">10000</speed-tx>
          <speed-rx unit="Mbps">100</speed-rx>
          <standard>802.3dm</standard>
          <phy role="master"/>
          <tsn>
            <gptp hw-timestamping="true" gm-capable="true"/>
            <qbv traffic-classes="8" hw-queues="4" max-gcl-entries="64"/>
            <preemption min-fragment-size="64"/>
          </tsn>
          <macsec><cipher>gcm-aes-128</cipher></macsec>
          <eee supported="true"/>
          <connector>Micro-Lock Plus 2.0 4C</connector>
        </capabilities>
      </port>
      <port name="eth1" iface="swp1" type="ethernet">
        <capabilities>
          <speed unit="Mbps">1000</speed>
          <standard>1000BASE-T1</standard>
          <phy role="slave"/>
        </capabilities>
      </port>
    </switch>

    <sensor name="imu0" update-rate="1000">
      <inertial type="accel_gyro">
        <pose>0.016 -0.001 -0.008 0 0 0</pose>
        <driver name="icm45686">
          <axis-align x="Y" y="-X" z="Z"/>
        </driver>
        <accel>
          <range unit="g">16</range>
          <resolution unit="mg">0.488</resolution>
          <noise type="gaussian">
            <mean>0</mean>
            <stddev>0.003</stddev>
            <bias-mean>0.01</bias-mean>
          </noise>
        </accel>
        <gyro>
          <range unit="dps">2000</range>
          <noise type="gaussian">
            <stddev>0.01</stddev>
          </noise>
        </gyro>
      </inertial>
    </sensor>

    <motor name="foc_motor" type="bldc" encoder="motor_encoder"
           hall="motor_hall" thermistor="motor_temp">
      <voltage unit="V" nominal="24" max="28"/>
      <current unit="A" continuous="6.5" peak="19"/>
      <resistance unit="ohm">0.5</resistance>
      <torque-constant unit="Nm/A">0.29</torque-constant>
      <velocity-constant unit="V/RPM">0.109</velocity-constant>
      <max-speed unit="rpm">260</max-speed>
      <stall-torque unit="Nm">19.76</stall-torque>
      <no-load-speed unit="rpm">257.9</no-load-speed>
      <no-load-current unit="A">0.974</no-load-current>
      <max-power-out unit="W">158.8</max-power-out>
      <max-efficiency unit="percent">68.4</max-efficiency>
      <control-modes>
        <mode>velocity</mode>
        <mode>position</mode>
        <mode>torque</mode>
      </control-modes>
    </motor>

    <surface name="wheel">
      <wheel type="driven">
        <radius unit="m">0.085</radius>
        <width unit="m">0.041</width>
        <friction static="0.9" dynamic="0.7"/>
      </wheel>
    </surface>
  </comp>

  <!-- Network: link, bus, chain, gPTP, schedule, MACsec -->
  <network name="test">
    <description>Test network exercising all topology types</description>

    <link name="test_link">
      <wired standard="802.3dm">
        <port>parent-body/eth0</port>
        <port>test-board/eth0</port>
        <vlan id="10" pcp="5"/>
        <macsec policy="must-secure" cipher="gcm-aes-128"
                key-agreement="psk" key-ref="test-key"/>
      </wired>
    </link>

    <bus name="test_can" type="CAN" topology="daisy-chain">
      <bitrate>5000000</bitrate>
      <participant device="parent-body" port="can0"
                   role="controller" position="1"/>
      <participant device="test-board" port="can0"
                   position="2" id="0x601" terminator="true"/>
    </bus>

    <chain name="test-chain" type="802.3dm" mode="switched" topology="line">
      <vlan id="10" pcp="5"/>
      <macsec policy="must-secure" cipher="gcm-aes-128"
              key-agreement="psk"/>
      <hop device="parent-body" port="eth0" role="root"/>
      <hop device="test-board" ingress="eth0" role="tail"/>
    </chain>

    <gptp domain="0">
      <clock device="parent-body" port="eth0"
             gm-capable="true" priority1="128" priority2="128"/>
      <clock device="test-board" port="eth0"
             gm-capable="false" priority1="255" priority2="255"/>
      <port-defaults log-sync-interval="-3"
                     neighbor-prop-delay-thresh-ns="800"/>
    </gptp>

    <schedule name="1ms-control" cycle-time-us="1000">
      <gate tc-mask="0x80" duration-us="50"/>
      <gate tc-mask="0x60" duration-us="200"/>
      <gate tc-mask="0x0F" duration-us="750"/>
    </schedule>

    <stream-profile uri="profiles/operational.streams.xml" active="true"/>

    <macsec policy="must-secure" cipher="gcm-aes-128" key-agreement="psk">
      <key-store type="secure-element" ref="se051"/>
    </macsec>
  </network>

  <transmission name="shoulder_transmission" type="planetary">
    <motor ref="foc_motor"/>
    <joint ref="shoulder_yaw"/>
    <reduction>50</reduction>
    <efficiency>0.85</efficiency>
  </transmission>

  <material name="rubber">
    <color rgba="0.1 0.1 0.1 1.0"/>
    <surface>
      <friction static="0.8" dynamic="0.6"/>
      <restitution>0.3</restitution>
    </surface>
  </material>

  <include uri="components/sensor-module.hcdf" sha="abc123"
           name="sensor-1" pose="0 0 0.1 0 0 0"/>

</hcdf>

Key features:

  • Every major element type in one file: comp, joint, group, state, network, transmission, material, include
  • Switch with 802.3dm asymmetric ports and TSN capabilities (gPTP, Qbv, preemption, MACsec, EEE)
  • 5 sensor categories: inertial (accel+gyro), optical (ToF with dual FOV), encoder, EM (hall), temperature
  • BLDC motor with full electrical specs and 3 control modes
  • Network with all 3 topology types: link, bus, chain
  • Planetary transmission with gear ratio and efficiency
  • Content-addressed include for modular composition

View full file on GitHub