battery-monitoring

Monitor battery health and publish BatteryState for ROS 2 robots.

18|2|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill battery-monitoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: battery-monitoring
Source: https://github.com/wimblerobotics/ros2-copilot-skills/tree/main/battery-monitoring
Command: npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill battery-monitoring

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Battery health and state of charge information are critical for reliable operation, but ROS 2 systems often lack standardized, real-time monitoring and a consistent BatteryState interface. This skill provides end-to-end battery monitoring by reading voltages and currents, estimating the state of charge, and publishing BatteryState on a ROS 2 topic.

Core Features & Use Cases

  • Voltage measurement via a divider and ADC, with filtering to reduce noise.
  • Current measurement using a shunt-based sensor (INA219/INA226) and calibration to support accurate power budgeting.
  • State of charge estimation through no-load voltage tracking, IR compensation, and coulomb counting.
  • Publishing sensor_msgs/BatteryState on a standard topic with per-cell voltages when available.
  • Alert thresholds and integration with behavior trees to trigger docking or safe shutdown.
  • Hardware safety guidelines to protect the battery and electronics.

Quick Start

Run the BatteryMonitor node to start publishing BatteryState after wiring up voltage, current sensors, and related hardware.

Frequently Asked Questions about battery-monitoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I estimate state of charge for a ROS 2 robot battery?

To estimate state of charge for a ROS 2 robot battery, you use no-load voltage tracking, internal resistance compensation, and coulomb counting. This combines real-time current and voltage measurements to calculate remaining capacity accurately for reliable operation.

How do I publish BatteryState messages in ROS 2 from voltage and current sensors?

You publish BatteryState messages in ROS 2 by reading ADC voltages through a voltage divider and measuring current via an INA219 or INA226 shunt sensor. The monitoring node filters this data and publishes standard sensor_msgs/BatteryState topics with per-cell voltages.

What is the best way to measure battery current and voltage for power budgeting in ROS 2?

The best way to measure battery current and voltage for power budgeting in ROS 2 is using a shunt-based sensor like INA219 or INA226 with proper calibration. This is paired with voltage divider ADC readings and filtering to reduce noise for accurate power calculations.

Can I trigger automatic docking or safe shutdown based on battery state in ROS 2?

Yes, you can trigger automatic docking or safe shutdown by setting alert thresholds based on battery state in ROS 2. The monitoring system integrates with behavior trees to initiate these safety actions when voltage or state of charge drops below configured limits.