Batteries are modeled as a linear countdown. The countdown for the UGVs (X1 & X2) is 90 minutes of simulation time, and 20 minutes for the UAVs (X3 & X4). Once the countdown reaches zero, a robot will no longer be able to move.
Note: Batteries begin to drain when vehicle motion starts.
The current battery state for each robot can be obtained through topic
<robot name>/battery_state, which publishes sensor_msgs/BatteryState. Message fields to keep an eye on:
power_supply_status, which can be:
POWER_SUPPLY_STATUS_FULL, while it hasn't started discharging
POWER_SUPPLY_STATUS_DISCHARGING, while it is discharging
percentage, which goes from