Skip to content

IsBatteryCharging

Checks if the battery is charging by subscribing to a sensor_msgs/BatteryState topic and checking if the power_supply_status is POWER_SUPPLY_STATUS_CHARGING. Returns SUCCESS in that case, FAILURE otherwise.

Input Ports

battery_topic

Type: string Default: "/battery_status"

Topic for battery info.

Example

<IsBatteryCharging battery_topic="/battery_status"/>