Message Schemas
PlanMessage plan.schema.json
| Property | Type | Description | Required |
|---|---|---|---|
| plan_id | string | Yes | |
| timestamp | string | Yes | |
| goal | string | Yes | |
| steps | array | Yes | |
| steps[] | array<object> | ||
| steps[].id | string | Yes | |
| steps[].action | string | Yes |
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
| Property | Type | Description | Required |
|---|---|---|---|
| state_id | string | Yes | |
| timestamp | string | Yes | |
| imu | object | Yes | |
| imu.accel | array | Yes | |
| imu.accel[] | array<number> | ||
| imu.gyro | array | Yes | |
| imu.gyro[] | array<number> | ||
| encoders | array | Yes | |
| 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
| Property | Type | Description | Required |
|---|---|---|---|
| traj_id | string | Yes | |
| timestamp | string | Yes | |
| frames_hz | number | Yes | |
| waypoints | array | Yes | |
| waypoints[] | array<object> | ||
| waypoints[].t | number | ||
| waypoints[].q | array | ||
| 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[]; }[];
}