Diagnostics
v0.64.0, changelogBetaA robot's health from ROS DiagnosticArray: the worst level and counts first, then a tree by "/" path with levels rolled up, each status a glyph and a word, Stale, a Problems filter and search.
API reference
Generated from the types. Every part also takes className.
Diagnostics
- statusesrequired
DiagnosticStatus[]Every status, as the latest of each name (merge arrays as they arrive withmergeDiagnosticsfromros).- label
stringThe robot's name, written above and naming the panel for screen readers: "AMR-07".- loading
boolean = falseWaiting for the first diagnostics: a skeleton the size of a short tree.- staleAfterMs
number | null = 5000A status not updated for this long reads Stale (by itsreceivedAt). 5000 ms by default: diagnostic_updater publishes once a second, and ROS's own aggregator calls a status stale after 5 s.nullnever times out.- now
numberThe time to measure from, in ms since the epoch. Left out, the panel reads the browser's clock once a second while any status has areceivedAt. Pass it for a fixed picture (a test, a screenshot, a recorded bag played back).- filter
"all" | "problems"Which statuses the tree shows, controlled; pair withonFilterChange.- defaultFilter
"all" | "problems" = "all"The filter at first (uncontrolled).- onFilterChange
(filter: DiagnosticsFilter) => void- query
stringThe search text, controlled; pair withonQueryChange.- defaultQuery
string = ""The search text at first (uncontrolled).- onQueryChange
(query: string) => void- defaultExpanded
string[]Statuses and groups open at first, by name ("/Motors/Left wheel" opens that status's values, "/Motors" the group). Groups with a problem under them open by themselves; this is for anything else.- locale
stringBCP 47 tag for the numbers and the "ago" times ("zh-TW", "de"): pass the app's locale. Left out, English ("en") on the server and in every browser, so the page hydrates cleanly; a tag Intl cannot read falls back to "en".- labels
Partial<DiagnosticsLabels>