From 33a74828004500085c0d75c8459a6a6a909b7ae4 Mon Sep 17 00:00:00 2001 From: Christian McCrave <84035301+cmccrave-CPR@users.noreply.github.com> Date: Mon, 22 Sep 2025 15:27:04 -0400 Subject: [PATCH 1/3] Update BatteryState.msg Signed-off-by: Christian McCrave <84035301+cmccrave-CPR@users.noreply.github.com> --- sensor_msgs/msg/BatteryState.msg | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sensor_msgs/msg/BatteryState.msg b/sensor_msgs/msg/BatteryState.msg index c42ed6e1..eda4a642 100644 --- a/sensor_msgs/msg/BatteryState.msg +++ b/sensor_msgs/msg/BatteryState.msg @@ -41,14 +41,20 @@ float32 charge # Current charge in Ah (If unmeasured NaN) float32 capacity # Capacity in Ah (last full capacity) (If unmeasured NaN) float32 design_capacity # Capacity in Ah (design capacity) (If unmeasured NaN) float32 percentage # Charge percentage on 0 to 1 range (If unmeasured NaN) +uint8 id # Identifier for the battery uint8 power_supply_status # The charging status as reported. Values defined above uint8 power_supply_health # The battery health metric. Values defined above uint8 power_supply_technology # The battery chemistry. Values defined above bool present # True if the battery is present float32[] cell_voltage # An array of individual cell voltages for each cell in the pack - # If individual voltages unknown but number of cells known set each to NaN + # If individual voltages unknown, but number of cells known, set each to NaN float32[] cell_temperature # An array of individual cell temperatures for each cell in the pack - # If individual temperatures unknown but number of cells known set each to NaN + # If individual temperatures unknown, but number of cells known, set each to NaN string location # The location into which the battery is inserted. (slot number or plug) +string manufacturer # The name of the manufacturer of the battery string serial_number # The best approximation of the battery serial number + +string hw_version # The hardware version of the battery +string sw_version # The software version of the battery +string fw_version # The firmware version of the battery From bc68e3be17b94a0629a574af8bc9dc5a09c4e343 Mon Sep 17 00:00:00 2001 From: Christian McCrave <84035301+cmccrave-CPR@users.noreply.github.com> Date: Mon, 22 Sep 2025 16:49:44 -0400 Subject: [PATCH 2/3] update id to 32 bit Signed-off-by: Christian McCrave <84035301+cmccrave-CPR@users.noreply.github.com> --- sensor_msgs/msg/BatteryState.msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sensor_msgs/msg/BatteryState.msg b/sensor_msgs/msg/BatteryState.msg index eda4a642..9be60477 100644 --- a/sensor_msgs/msg/BatteryState.msg +++ b/sensor_msgs/msg/BatteryState.msg @@ -41,7 +41,7 @@ float32 charge # Current charge in Ah (If unmeasured NaN) float32 capacity # Capacity in Ah (last full capacity) (If unmeasured NaN) float32 design_capacity # Capacity in Ah (design capacity) (If unmeasured NaN) float32 percentage # Charge percentage on 0 to 1 range (If unmeasured NaN) -uint8 id # Identifier for the battery +uint32 id # Identifier for the battery uint8 power_supply_status # The charging status as reported. Values defined above uint8 power_supply_health # The battery health metric. Values defined above uint8 power_supply_technology # The battery chemistry. Values defined above From 1166eed8fd58a5f26097c2889dfe9ac7099ee1a2 Mon Sep 17 00:00:00 2001 From: Christian McCrave <84035301+cmccrave-CPR@users.noreply.github.com> Date: Fri, 3 Oct 2025 16:28:49 -0400 Subject: [PATCH 3/3] add charge/discharge fault fields Signed-off-by: Christian McCrave <84035301+cmccrave-CPR@users.noreply.github.com> --- sensor_msgs/msg/BatteryState.msg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sensor_msgs/msg/BatteryState.msg b/sensor_msgs/msg/BatteryState.msg index 9be60477..9bcf0d81 100644 --- a/sensor_msgs/msg/BatteryState.msg +++ b/sensor_msgs/msg/BatteryState.msg @@ -47,6 +47,9 @@ uint8 power_supply_health # The battery health metric. Values defined abov uint8 power_supply_technology # The battery chemistry. Values defined above bool present # True if the battery is present +uint32 charge_fault # The current charge fault of the battery, if there is one +uint32 discharge_fault # The current discharge fault of the battery, if there is one + float32[] cell_voltage # An array of individual cell voltages for each cell in the pack # If individual voltages unknown, but number of cells known, set each to NaN float32[] cell_temperature # An array of individual cell temperatures for each cell in the pack