Skip to main content

Group Widget

Widget Type: rc-group

Group Widget

Configuration

Title - Human readable title for the widget

Layout (optional) - The group widget defaults to the pages layout but this can be changed by adding a layout config with type grid and defining how many columns you need.

{
"type": "grid",
"columns": 4,
}

widgets - An array of other widget configs to be nested in the group, currently supported types are healthcheck, questions, flows and autowalk. Each widget is configured as follows:

[
{
"type": "healthcheck",
"config": {
... widget config here
}
}, ...
]

Example config

{
"title": "Spot",
"widgets": [
{
"type": "healthcheck",
"config": {
"checks": [
{
"id": "heartbeat",
"name": "Heartbeat",
"source": "/rocos/agent/telemetry/heartbeat",
"sourceType": "telemetry",
"expression": "(args) => !!args?.payload?.tim"
},
{
"id": "battery",
"name": "Battery above 30%",
"source": "/spot/robot_state/battery_states",
"sourceType": "telemetry",
"expression": "(args) => args.payload?.[0]?.charge_percentage?.value > 30"
},
{
"id": "lease",
"name": "Lease held",
"source": "/spot/lease/leaseHeld",
"sourceType": "telemetry",
"expression": "(args) => args.payload === true"
},
{
"id": "localised",
"name": "Localised",
"source": "/spot/graphnav/localizationStatus",
"sourceType": "telemetry",
"expression": "(args) => {\n return args.payload?.localization && Object.keys(args.payload.localization).length > 0; }"
},
{
"id": "faults",
"name": "Critical faults",
"source": "/spot/robot_state/faults/critical_faults",
"sourceType": "telemetry",
"expression": "(args) => {\n const faults = args.payload?.faults;\n if (!faults) return true;\n if (Object.keys(faults).length > 0 || faults.length > 0) return false;\n return true;\n }"
},
{
"id": "estops",
"name": "EStops",
"source": "/spot/robot_state/estop_states",
"sourceType": "telemetry",
"expression": "(args) => args.payload?.every((estop) => estop.state === 2)"
},
{
"id": "spotCamBitrate",
"name": "SpotCAM Bitrate",
"source": "/spot/spotcam/stream_quality/getStreamParams",
"sourceType": "service",
"expression": "(args) => args.params?.targetbitrate?.value <= 2097152"
}
]
}
},
{
"type": "questions",
"config": {}
},
{
"type": "flows",
"config": {}
},
{
"type": "autowalk",
"config": {}
},
{
"type": "anymalMissions",
"config": {},
},
{
"type": "assets",
"config": {},
},
]
}