Adaptobotics

Message Schemas

PlanMessage plan.schema.json

PropertyTypeDescriptionRequired
plan_idstringYes
timestampstringYes
goalstringYes
stepsarrayYes
steps[]array<object>
steps[].idstringYes
steps[].actionstringYes
JSON Schema
{
  "title": "PlanMessage",
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "string"
    },
    "timestamp": {
      "type": "string"
    },
    "goal": {
      "type": "string"
    },
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "action": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "action"
        ]
      }
    }
  },
  "required": [
    "plan_id",
    "timestamp",
    "goal",
    "steps"
  ]
}

StateMessage state.schema.json

PropertyTypeDescriptionRequired
state_idstringYes
timestampstringYes
imuobjectYes
imu.accelarrayYes
imu.accel[]array<number>
imu.gyroarrayYes
imu.gyro[]array<number>
encodersarrayYes
encoders[]array<number>
JSON Schema
{
  "title": "StateMessage",
  "type": "object",
  "properties": {
    "state_id": {
      "type": "string"
    },
    "timestamp": {
      "type": "string"
    },
    "imu": {
      "type": "object",
      "properties": {
        "accel": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "gyro": {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      },
      "required": [
        "accel",
        "gyro"
      ]
    },
    "encoders": {
      "type": "array",
      "items": {
        "type": "number"
      }
    }
  },
  "required": [
    "state_id",
    "timestamp",
    "imu",
    "encoders"
  ]
}

TrajectoryMessage trajectory.schema.json

PropertyTypeDescriptionRequired
traj_idstringYes
timestampstringYes
frames_hznumberYes
waypointsarrayYes
waypoints[]array<object>
waypoints[].tnumber
waypoints[].qarray
waypoints[].q[]array<number>
JSON Schema
{
  "title": "TrajectoryMessage",
  "type": "object",
  "properties": {
    "traj_id": {
      "type": "string"
    },
    "timestamp": {
      "type": "string"
    },
    "frames_hz": {
      "type": "number"
    },
    "waypoints": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "t": {
            "type": "number"
          },
          "q": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        }
      }
    }
  },
  "required": [
    "traj_id",
    "timestamp",
    "frames_hz",
    "waypoints"
  ]
}

Generated TypeScript Types

Generated by npm run typegen from pkgs/common/schemas/*.schema.json.

/* AUTO-GENERATED FILE. DO NOT EDIT.
 * Run: npm run typegen
 */
/* eslint-disable */

// Source: pkgs/common/schemas/plan.schema.json
export interface PlanMessage {
  plan_id: string;
  timestamp: string;
  goal: string;
  steps: { id: string; action: string; }[];
}

// Source: pkgs/common/schemas/state.schema.json
export interface StateMessage {
  state_id: string;
  timestamp: string;
  imu: { accel: number[]; gyro: number[]; };
  encoders: number[];
}

// Source: pkgs/common/schemas/trajectory.schema.json
export interface TrajectoryMessage {
  traj_id: string;
  timestamp: string;
  frames_hz: number;
  waypoints: { t?: number; q?: number[]; }[];
}