Checks idle behavior before executing emergency charge#512
Checks idle behavior before executing emergency charge#512aaronchongth merged 3 commits intomainfrom
Conversation
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
xiyuoh
left a comment
There was a problem hiding this comment.
Thanks for adding this in! This approach seems reasonable to me, also tested it out with/without the fix and the robot is now completely decommissioned without being allocated emergency charge task!
|
Hi @aaronchongth, thanks for this fix! I have a question about the refinement in 8ec63c6. When finishing_request is not configured (i.e., _idle_task is null), the label check in 8ec63c6 is entirely skipped because it's inside if (_idle_task), and the emergency charge still gets dispatched to decommissioned robots. The simpler approach in 8e9355c (if (!is_performing_idle_behavior()) return false;) would have caught this case. Was the refinement in 8ec63c6 intentional to preserve emergency charging for non-charge idle behaviors (e.g., park)? |
|
hey @Akio-Ki! Yes that is intended, because emergency-retreat-to-charger is a separate feature from idle behaviors. |
Bug fix
Fixed bug
Fixes https://discourse.openrobotics.org/t/auto-recharge-task-dispatched-to-decommissioned-robot-with-idle-behavior-false/53190, depends on expected behavior.
Requires open-rmf/rmf_task#134
Fix applied
How to test
Make these changes to
slotcar_common.hpp, to start with lower battery and drain fasterMake this change to
tinyRobot_config.yaml, to increase recharge thresholddiff --git a/rmf_demos/config/office/tinyRobot_config.yaml b/rmf_demos/config/office/tinyRobot_config.yaml index 3596249..9e9e23c 100644 --- a/rmf_demos/config/office/tinyRobot_config.yaml +++ b/rmf_demos/config/office/tinyRobot_config.yaml @@ -22,7 +22,7 @@ rmf_fleet: power: 20.0 # W tool_system: power: 0.0 # W - recharge_threshold: 0.10 # Battery level below which robots in this fleet will not operate + recharge_threshold: 0.50 # Battery level below which robots in this fleet will not operate recharge_soc: 1.0 # Battery level to which robots in this fleet should be charged up to during recharging tasks publish_fleet_state: 10.0 # Publish frequency for fleet state, ensure that it is same as robot_state_update_frequency account_for_battery_drain: TrueAfter rebuilding and starting the sim,
pantryandpatrol_bfor 20 loopsGenAI Use
We follow OSRA's policy on GenAI tools
Generated-by: