Posted by @RDaneelOlivav:
Hi,
When the battery level gets lower than a certain value, the task to go back to the charging station is issued. But it does coincide with the value of recharge_threshold
. And if it gets lower tan the recharge_threshold
. The robot is considered useless or at least that can’t get anywhere.
Where and how is this recommended percentage of the battery calculated? Is it 10% of the recharge_threshold?
Chosen answer
Answer chosen by @RDaneelOlivav at 2022-08-18T11:06:54Z.
Answered by @Yadunund:
The logic is baked into the TaskManger
as seen here. When the robot is idle, a timer periodically computes the estimated battery drain if the robot were to head back to the charger now. If the battery level after the estimated drain is within a safety factor applied to the recharge_threshold
, the TaskManager
will automatically begin a task to take the robot back to its charging station.
The recharge_threshold
is used in a similar manner during task allocation. When deciding the order of tasks performed, the TaskPlanner
will estimate the battery level of the robot after performing a task A. If the estimate is below the recharge_threshold
, it will then check if the robot can perform task A if it performed a recharge task before this. If this is the case then it will automatically include a recharge task before task A. If it still cannot perform task A even after recharging, it will discard the possibility of doing task A in that sequence.