Forced start of the charging task (free_fleet) (#643)

Posted by @abutalipovvv:

I’m currently testing the free_fleet adapter, how can I force the charger task to work?

For tasks such as patrol, delivery, and clean, there are ready-made requests in the form of json,
but I couldn’t find any for charger tasks.

Is it possible to send a charger task using a compose json request?
If not, can I somehow manage the fleet’s operating mode?

for example I can use compose task with phases: go_to_place → perform_action(docking, make MODE_DOCKING) → perform_action(charge, make MODE_CHARGING)
In rmf_web, there are STATUS cells in the status bar of the robot, I want to learn how to manage this status forcibly using the rmf api

Posted by @aaronchongth:

for example I can use compose task with phases: go_to_place → perform_action(docking, make MODE_DOCKING) → perform_action(charge, make MODE_CHARGING)

Custom actions for the free fleet adapter is currently being worked on, and it will allow for exactly this form of tasks. However the caveat is the actions will be implementation specific. For example, we intend to first implement the actions for nav2’s default docking/undocking (which is supported by the turtlebot4, as well as any other stacks that implement the standard), which will already start the charging sequence.

The upcoming perform actions setup will be plugin-based, so users can implement their own actions, that composed task phases can target.

In rmf_web, there are STATUS cells in the status bar of the robot, I want to learn how to manage this status forcibly using the rmf api

That will be implemented based on the action plugins as well, each custom action will be able to modify the robot’s status during the course of the action to be correctly reflected on the dashboard

edit: if you’d like to dig a little deeper into what this all means, we already have something similar implemented for the fleet_adapter_mir, fleet_adapter_mir/fleet_adapter_mir_actions/fleet_adapter_mir_actions at main · open-rmf/fleet_adapter_mir · GitHub, which we hope to flesh out as part of the core API and implementation of Open-RMF

edit again: apologies, I was answering with general perform actions in mind, however for docking and charging specifically, it is part of the core actions by RMF, and users won’t need to send a task to do it specifically. It can be set as an automatic idle behavior. This is just not yet implemented by the free fleet adapter


Edited by @aaronchongth at 2025-03-21T03:22:13Z

Posted by @xiyuoh:

Hi @abutalipovvv ! To add on, in general to trigger a charging task, you’d simply have to send a patrol task to the charger waypoint - there’s no need to create a perform action to trigger docking unless there is additional logic you need for the docking sequence. On your navigation graph, you’ll have to provide a dock_name for your charger waypoint, preferably with the same name as the waypoint itself.

However, since docking is not yet available on free fleet, charging tasks cannot be performed unless your robot can charge without docking. Like @aaronchongth mentioned it is a TODO, but if you’d like to get started on implementing it for your project, feel free to open a PR to the free fleet repo. It might be helpful to refer to how docking is implemented in rmf_demos_fleet_adapter or fleet_adapter_mir. Let us know if you need further guidance.