Widgets

The RosFit dashboard is built from composable widgets that visualize telemetry, accept input, and display device state. Widgets are drag-and-drop configurable and update in real-time over WebSocket.

Overview

Every widget shares a common set of configuration options:

OptionTypeDefaultDescription
titlestringwidget type nameDisplay title
device_idstringselected deviceTarget device
topicstringTelemetry topic to bind to
refresh_msnumber1000Update interval in milliseconds
widthnumber1Grid columns (1–4)
heightnumber1Grid rows (1–3)
themestringautoColor theme (light, dark, auto)

Widgets are configured via the dashboard's visual editor (drag, resize, and click the gear icon) or programmatically through a JSON layout definition.

Gauge

A circular gauge for displaying a single numeric metric with min/max bounds and color zones.

OptionTypeDescription
metricstringMetric path (e.g. battery_percent, cpu_temp)
minnumberMinimum value (default 0)
maxnumberMaximum value (default 100)
unitstringDisplay unit (%, °C, m/s)
zonesarrayColor zones: [{from, to, color}]

Example configuration:

{
  "type": "gauge",
  "metric": "battery_percent",
  "min": 0,
  "max": 100,
  "unit": "%",
  "zones": [
    { "from": 0, "to": 20, "color": "red" },
    { "from": 20, "to": 50, "color": "yellow" },
    { "from": 50, "to": 100, "color": "green" }
  ]
}

Line chart

A time-series line chart for plotting telemetry values over a rolling window.

OptionTypeDescription
metricsarrayList of metric paths to plot (supports multi-line)
windowstringRolling window (30s, 5m, 1h, 24h)
y_min / y_maxnumberY-axis bounds (auto-scaled if omitted)
colorsarrayLine colors per metric
interpolationstringlinear, step, spline
show_legendbooleanShow/hide the legend

Ideal for velocity, temperature, battery trends, and position traces.

Bar chart

A bar chart for comparing discrete values across devices or topics.

OptionTypeDescription
data_sourcestringdevice (compare metrics) or fleet (compare devices)
metricstringMetric to compare
group_bystringGrouping field (device, group, type)
orientationstringhorizontal or vertical
stackedbooleanStack bars for multi-metric comparison

Useful for fleet-wide battery comparison or per-group error counts.

Map marker

Displays a device's GPS or odometry position on an interactive Leaflet map.

OptionTypeDescription
position_topicstringTopic providing position data (default odom)
trailbooleanShow movement trail (default true)
trail_lengthnumberMax trail points (default 200)
tile_layerstringMap tile URL (OpenStreetMap, satellite, or custom)
zoomnumberInitial zoom level
show_headingbooleanShow heading arrow on marker

For indoor robots without GPS, the map renders on a blank canvas or a custom floor plan image.

Camera feed

Streams a live camera feed from a device over WebRTC or MJPEG.

OptionTypeDescription
stream_urlstringWebRTC signaling URL or MJPEG endpoint
topicstringROS 2 image topic (bridge converts to MJPEG)
resolutionstringRequested resolution (480p, 720p, 1080p)
fpsnumberTarget frame rate
overlaybooleanShow timestamp and device ID overlay
snapshotbooleanEnable click-to-snapshot

The bridge can transcode sensor_msgs/Image to MJPEG for browser consumption when a direct stream URL is not available.

3D viewer

A Three.js-based 3D viewport for visualizing robot models, point clouds, or paths.

OptionTypeDescription
model_urlstringURDF or glTF model URL
topicsarrayROS 2 topics to overlay (/tf, /scan, /path)
backgroundstringBackground color or skybox
camera_modestringorbit, follow, first_person
show_gridbooleanShow ground grid
point_sizenumberPoint cloud point size

This widget provides a lightweight alternative to RViz for remote monitoring.

SLAM map

Renders a 2D occupancy grid from a SLAM algorithm (nav_msgs/OccupancyGrid).

OptionTypeDescription
map_topicstringOccupancy grid topic (default /map)
pose_topicstringRobot pose topic (default /amcl_pose)
show_pathbooleanOverlay planned path
show_costmapbooleanOverlay cost map layer
show_goalsbooleanShow navigation goal markers
auto_centerbooleanKeep the robot centered in the view

Joystick

A virtual joystick for manual teleoperation directly from the browser.

OptionTypeDescription
publish_topicstringMQTT topic to publish velocity commands
max_linearnumberMaximum linear velocity (m/s)
max_angularnumberMaximum angular velocity (rad/s)
deadzonenumberJoystick deadzone (0–1)
rate_hznumberCommand publish rate
modestringdifferential (2-axis) or holonomic (3-axis)

The joystick sends geometry_msgs/Twist-compatible JSON to the command topic.

Terminal

An embedded terminal for sending raw MQTT messages or CLI commands to a device.

OptionTypeDescription
modestringmqtt (raw MQTT publish) or shell (remote shell via bridge)
default_topicstringPre-filled MQTT topic
history_sizenumberNumber of commands to keep in history
show_timestampsbooleanPrefix each message with a timestamp

In mqtt mode you can publish arbitrary JSON to any topic in the device's namespace. In shell mode (requires bridge v2+) you can execute diagnostic commands on the robot.

Status indicator

A compact status badge showing a device's connection state and key metrics.

OptionTypeDescription
show_uptimebooleanDisplay uptime counter
show_batterybooleanDisplay battery percentage
show_signalbooleanDisplay signal strength
sizestringcompact, normal, large
blink_on_errorbooleanBlink animation on error state

Designed for embedding in fleet list rows or sidebar panels.

Table

A tabular view for displaying structured telemetry or device metadata.

OptionTypeDescription
columnsarrayColumn definitions: [{field, label, format}]
data_sourcestringtelemetry or devices
sortablebooleanEnable column sorting
filterablebooleanEnable column filtering
page_sizenumberRows per page
exportbooleanEnable CSV/JSON export

Useful for displaying joint states, diagnostic arrays, or fleet device lists.