Battery Gauge

FREE
SENSORS · 16 FIELDS · 2×2 DEFAULT
72%

Battery level with color-coded status

When to reach for it

Battery Gauge reads a percentage from a battery topic and renders it color-coded against your thresholds, with an optional charging bolt. Style picks the look: a filling cell (the default), a ring, segments, a numeral, a pixel tank or a full-card pixel tank. For a plain numeric readout, Value Display covers it, though its own threshold coloring is Pro. For a voltage or percentage trend over time, Sparkline (Pro) plots the history this widget throws away.

Worked example: stock BatteryState on /battery_state

Topic /battery_state (the default), schema sensor_msgs/msg/BatteryState, Source BatteryState (.percentage) (the default): the widget reads .percentage off the message, so a robot publishing 0.82 per REP-145 shows 82%. Leave Show Charging on (the default) with its Charging Topic blank: the same message's power_supply_status field draws the bolt while charging and a plug when full.

Watch out for
  • Value Scale Auto learns the 0..100 scale only once a reading tops 1.5. A robot on that scale that connects nearly dead, reporting a raw 1, reads as a full battery until then. Force 0..100 if your robot can connect near empty.
  • BatteryState (.percentage)does not inspect the topic's schema, it always reads .percentage. A non-standard publisher needs Custom field (Pro) chosen explicitly.

Configuration fields

Topictopic

The topic this widget reads from. While connected, tap to pick one the robot advertises.

Sourceselect

Where to read the percentage from. BatteryState reads the percentage field of a sensor_msgs/BatteryState.

BatteryState (.percentage)Custom field
Custom Data Source

Read battery percentage from any numeric field on any topic.

Custom FieldPROfield-path

Any numeric field path to read as the battery percentage.

Value Scaleselect

Auto: above 1 means 0..100, and once a reading tops 1.5 it stays 0..100 for this connection. Force 0..100 if the robot can connect near empty, or 0..1 if it reports just above 1 when full.

Auto0..1 (REP-145)0..100
Max Message Rate (Hz)number

Messages per second this widget takes from the topic. Lower saves data, higher shows more.

0.1 to 60, step 0.1
Warning Threshold (%)number

The charge at or below which the battery turns yellow. Can't be below the Critical Threshold.

0 to 100, step 1
Critical Threshold (%)number
0 to 100, step 1
Show Chargingboolean

Shows a bolt while charging and a plug when full, from the battery topic's power_supply_status or the field below.

Charging Topictopic

Topic carrying the charge state, such as a std_msgs/Bool. Leave blank to read it from the battery topic above.

Charging Fieldfield-path

Field holding the charge state: a boolean, or a number that means charging when nonzero. Blank reads data on a separate Charging Topic, and only power_supply_status on the battery topic.

Show Voltageboolean

Shows the battery voltage under the icon, read from the topic's voltage field unless you pick another. Shows --V if the topic doesn't publish one.

Voltage Topictopic

Topic carrying the voltage. Leave blank to read it from the battery topic above.

Voltage Fieldfield-path

Field holding the voltage, like voltage on a BatteryState or data on a std_msgs/Float32.

Styleselect

Every style draws the same reading: the charge, its color from Warning Threshold and Critical Threshold, and the bolt while charging. Cell is the default. The preview runs the battery down, charges it, and holds it at full.

Live preview
72%
Cell
72%
Ring
discharging
72%
Segments
72%
discharging
Numeral
72%
Pixel Tank
%
Pixel Tank Full
Number on Batteryselect

The charge drawn on the battery, with or without a percent sign, or no number at all.

72%72Off
Orientationselect
AutoHorizontalVertical