Posted by @jkeshav-bvignesh:
Hi team,
I am trying to understand the Task Allocation Planner in rmf_task and since the official documentation is still in progress, I had a few questions that I require some clarity on.
- Assuming the default
BinaryPriorityCostCalculator
is used with theTaskPlanner::complete_solve
, Is this flow correct?- Every time the make_initial_node function is called in
complete_solve
, the cost is calculated. - The
h_value
of the cost requires theinvariant_duration
which is calculated using the correspondingTask::Model
. - The
Model
in turn uses thermf_traffic::agv::Planner
to calculate the actual plan. - The default
agv::planning::interface
that is used here is theDifferentialDrivePlanner
DifferentialDrivePlanner.plan(state)
then callsa_star_search
on this state
Please correct me if I am wrong as this is
- Every time the make_initial_node function is called in
- If the above flow holds, does the
a_star_search
run on the complete node_graph or a subset of nodes? I am curious about theinternal.queue
. - Does the Task Planner reallocate previously assigned but still pending tasks among the fleet’s robots when the new request is estimated? I believe this has got to do something with how the
best_candidates
are selected for an assignment.- I saw that Generalized Task Planning is in the works. Is this a high priority right now?
- What happens when multiple bid notices arrive at the same time? Since the
bid_notice_cb
is executed per request, I assume, theTaskPlanner
allocates one request at a time. - Since the
final_assignment
can take multiple iterations - there is awhile(node)
loop incomplete_solve
that runs with new estimates and every iteration has a new node creation that calls a_star - is there any limitation on the number of robots / requests or node graph size? Or is the bid ignored as thebidding_time_window
defaults to 2 seconds? - I came across rmf_planner_viz in the old archived repo. I encountered some build errors related to some dependencies, but since the visualizer was not moved here, is this not valid anymore?
- Will the official documentations for the planners be available soon? Are there any other open design docs for the task and traffic modules to enable new devs to understand the system faster and contribute?
Thanks in advance
Chosen answer
Answer chosen by @jkeshav-bvignesh at 2022-05-17T12:01:39Z.
Answered by @mxgrey:
- Everything you described about the flow of the planner appears accurate.
- I’m not sure what
node_graph
you’re asking about. Could you clarify that? And whicha_star_search
? The task planner uses A* search and the path planner also uses A* search, so I’m not sure which you are referring to. - Yes, pending tasks that are assigned to a fleet may be reordered within the fleet when new tasks come in. Currently there is no mechanism for moving a task to a different fleet after it has been assigned to a fleet, but that is something we’d like to explore in the future. Expanding on our task planning implementation is currently waiting on a source funding for that work.
- Correct, the task dispatcher will only hold one task auction at a time. A new task request will not be bid on until all previous requests have been assigned.
- We currently do not put any explicit limitations on the number of robots or the number of tasks can be requested at once. (Although I can say that task planning seems to be faster with more robots because when there are more candidates we don’t have to consider as many permutations of task ordering.) You’re right to point out that if there are too many pending task requests then it’s possible for the bidder to miss the 2-second window. In the use cases we’ve been involved with so far we haven’t seen that issue, but it’s definitely something we want to address in the future. Most likely we’d want the bidders to emit a heartbeat while they work on finding a solution, and the auctioneer would keep waiting until the heartbeats stop appearing.
rmf_planner_viz
is very difficult to get built and running. We’re going to be reworking the whole planner and providing a new easy-to-use visualizer for it. I’ll try to remember to post about it here when it’s ready for viewing.- This will depend largely on resource and time constraints. We’re always looking for funding to improve documentation, but most customers are more interested in new/better features. Truthfully the existing task and path planning libraries are likely to end up as informative prototypes that will be deprecated in favor of new, better libraries. Our best chance at having good documentation might be to write it as we develop the successors to these libraries.