Rewire
Custom Mappings

Examples

Example custom mapping configurations.

Motor telemetry

Log motor status as scalar time series and text logs:

[
  {
    type: "my_robot/MotorStatus",
    entity: "motor",
    fields: {
      temperature: { archetype: "Scalars" },
      rpm: { archetype: "Scalars" },
      current: { archetype: "Scalars" },
      status_text: { archetype: "TextLog" },
    }
  },
]

3D detections from a custom message

Expand an array of detections into Rerun Points3D:

[
  {
    type: "my_robot/Detections",
    fields: {
      detections: {
        archetype: "Points3D",
        each: ".",
        x: "position.x",
        y: "position.y",
        z: "position.z",
        label: "class",
      },
    }
  },
]

Nested sensor data

Recurse into nested sub-messages and log individual fields:

[
  {
    type: "my_robot/SensorPack",
    entity: "sensors",
    fields: {
      imu: {
        fields: {
          accel_x: { archetype: "Scalars" },
          accel_y: { archetype: "Scalars" },
          accel_z: { archetype: "Scalars" },
          gyro_x: { archetype: "Scalars" },
          gyro_y: { archetype: "Scalars" },
          gyro_z: { archetype: "Scalars" },
        }
      },
      gps: {
        archetype: "GeoPoints",
        lat: "latitude",
        lon: "longitude",
        alt: "altitude",
      },
    }
  },
]

Bounding boxes from a vision pipeline

Map 2D detection results to Boxes2D:

[
  {
    type: "my_robot/BoundingBoxes",
    fields: {
      boxes: {
        archetype: "Boxes2D",
        each: ".",
        center_x: "center_x",
        center_y: "center_y",
        half_width: "half_width",
        half_height: "half_height",
        label: "class_name",
      },
    }
  },
]

Combining with built-in types

Custom mappings are additive — they work alongside the 74 built-in type mappings. They cannot replace one: a custom mapping for a type that already has a built-in converter stops Rewire at startup with cannot override built-in converter. Run rewire types to see which types are built in.

On this page

Last updated on October 25, 2026

© 2026 Rewire