osrf / rmf_core

Provides the centralized functions of RMF: scheduling, etc.
Apache License 2.0
102 stars 41 forks source link

How does fleet adapter plans and decide which robot to execute a task given by dispatcher node? #318

Closed destkk closed 3 years ago

destkk commented 3 years ago

Hi there. May I understand further in-depth how the fleet adapter in the rmf_demos plans and decide the fleet and robot to execute a task given by the dispatcher node and submit as a bid_proposal?

I understand that it is based on the shortest path and cost. But which node (???) in the fleet adapter does the computation?

mxgrey commented 3 years ago

The shortest path is a factor, but that's not the only thing that's considered.

When proposing a bid, the fleet will imagine that the task has been assigned to itself and then calculate the optimal overall distribution of tasks across all its robots. A "cost" is calculated for that overall distribution of tasks. The cost is based on an estimation of how long all the tasks will take to complete, factoring in the time that the user asked for the tasks to be done.

When that overall distribution cost is found, the fleet submits that cost as its bid to the task dispatcher. The dispatcher then chooses the bid with the lowest cost, and assigns the task to that fleet. When the fleet is assigned the task, it already knows which robot to assign it to, because it already calculated that in order to come up with its bid.

mxgrey commented 3 years ago

I'll be closing this ticket since it's not an issue, and also this repo is being deprecated in favor of open-rmf/rmf_traffic and open-rmf/rmf_ros2.

To continue the discussion, please open an item in https://github.com/open-rmf/rmf/discussions.