Skip to content

Robot can silently drain battery at home without notifying operators #1139

Description

@aeshub

Describe the improvement you would like to see

When the robot is in Home, Recharging, or RechargingWithMission and its battery is draining instead of charging, ISAR has no way to notice. The robot silently discharges until it powers off, with no operator alert.

The problem

The state machine only reacts to two battery thresholds while parked: Home -> Recharging below ROBOT_MISSION_BATTERY_START_THRESHOLD (25%), and Recharging -> Home above ROBOT_BATTERY_RECHARGE_THRESHOLD (80%). Neither checks whether charging is actually happening, so a failed charger results in a monotonic discharge with no transition out.

Possible causes

  • Robot not physically docked correctly (misalignment, dirty contacts).
  • Charger / cable / dock / contactor hardware failure.
  • Power cut at the docking station.
  • Robot reports Home but never engages charging mode.
  • Parasitic load exceeds charge current.

In all cases the robot's self-reported status stays Home, so existing status-based handlers do not fire.

Why detection is non-trivial

  • Battery readings are noisy between polls.
  • Brief drops right after docking can be normal.
  • Charge rate varies per robot, so any rate-based check must tolerate slow chargers without missing real failures.
  • The signal must work across all robot packages via RobotInterface.get_battery_level.

Desired outcome

Transition to InterventionNeeded with a clear reason so the existing TOPIC_ISAR_INTERVENTION_NEEDED MQTT alert reaches operators before the battery is depleted.

Possible implementation paths

  • Rate-of-change over a window.

Related: #910 (recovery side of the same scenario).

How will this improvement affect the current Threat Model?

Leave blank for maintainers to fill out if you are uncertain about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementImprovement to existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions