Function rpc_api::addNewPlan#
Defined in File server.cpp
Function Documentation#
-
void rpc_api::addNewPlan(string &new_plan_json_str)
Add a new MAPF plan to the ADG.
This function takes a JSON string representing a new MAPF plan and adds it to the ADG (Action Decision Graph). If necessary, it utilizes the backup planner to ensure the plan is integrated correctly.
- Parameters:
new_plan_json_str – A JSON string with a new MAPF plan with the following schema:
{ "success": true, "plan": [ [(row, col, timestep, task_id), ... ], ... ], "congested": false, "stats": { ... } }plan: a list of lists of tuples, where each outer list corresponds to a single robot’s path. Each inner list contains tuples of the form(row, col, timestep, task_id):row: The row index of the robot’s position on the grid.col: The column index of the robot’s position on the grid.timestep: The timestep at which the robot should be at the specified position.task_id: The task identifier, or-1if no task is associated.
success: indicates whether the planner successfully produced collision-free paths for all robots. Iffalse, the backup planner is invoked.congested[Optional]: indicates whether congestion was detected, typically defined as more than half of the robots making no progress.stats[Optional]: contains additional planner statistics recorded by LSMART.