+
+ # Plot `path` and `max_path`.
+ if "max_path" in scenario and len(scenario["path"]) > 0:
+ plt.plot(*plot_nodes(scenario["max_path"]), color="orange")
+ if "path" in scenario and len(scenario["path"]) > 0:
+ plt.plot(*plot_nodes(scenario["path"]), color="orange")
+
+ # If there are possible starts specified, you may print and plot them.
+ #if "starts" in scenario and len(scenario["starts"]) > 0:
+ # print("possible starts:")
+ # for p in scenario["starts"]:
+ # plt.plot(*p, color="red", marker="+", ms=12)
+ # print(" {}".format(p))
+
+ # For the Last Maneuver figure from the paper, use:
+ # - `init2` -- orange
+ #plt.plot(*plot_car(scenario["init2"]), color="orange")
+ #plt.plot(
+ # scenario["init2"][0] - MINX,
+ # scenario["init2"][1] - MINY,
+ # color="orange",
+ # #marker="+",
+ # ms=12
+ #)
+ # - `goal2` -- orange
+ #plt.plot(*plot_car(scenario["goal2"]), color="orange")
+ #plt.plot(
+ # scenario["goal2"][0] - MINX,
+ # scenario["goal2"][1] - MINY,
+ # color="orange",
+ # #marker="+",
+ # ms=12
+ #)
+ # - `goal2` -- middle (orange)
+ #plt.plot(*plot_car(scenario["goals"][0]), color="orange")
+ #plt.plot(
+ # scenario["goal2"][0] - MINX,
+ # scenario["goal2"][1] - MINY,
+ # color="orange",
+ # #marker="+",
+ # ms=12
+ #)
+ # - `init1` -- green
+ #plt.plot(*plot_car(scenario["init1"]), color="green")
+ #plt.plot(
+ # scenario["init1"][0] - MINX,
+ # scenario["init1"][1] - MINY,
+ # color="green",
+ # #marker="+",
+ # ms=12
+ #)
+ # - `goal1` -- green
+ #plt.plot(*plot_car(scenario["goal1"]), color="green")
+ #plt.plot(
+ # scenario["goal1"][0] - MINX,
+ # scenario["goal1"][1] - MINY,
+ # color="green",
+ # #marker="+",
+ # ms=12
+ #)
+
+ # For the Possible Entry Configurations from the paper, use:
+ #if "inits" in scenario:
+ # for i in scenario["inits"]:
+ # print(i)
+ # if len(i) == 3:
+ # plt.plot(*plot_car(i), color="gray")
+ # plt.plot(
+ # i[0] - MINX,
+ # i[1] - MINY,
+ # color="gray",
+ # marker="+",
+ # ms=12,
+ # )
+ # plt.plot(*plot_car(scenario["inits"][0]), color="magenta")
+ # plt.plot(
+ # scenario["inits"][0][0] - MINX,
+ # scenario["inits"][0][1] - MINY,
+ # color="magenta",
+ # marker="+",
+ # ms=12,
+ # )
+
+ # The `scenario` may also include:
+ # - `last` -- not sure what this is, see the source code. Maybe overlaps
+ # with the `goal`.
+ # - `last1` -- used to demonstrate In-Slot Planner (was Parking Slot
+ # Planner (PSP.))
+ # - `last2` -- used to demonstrate In-Slot Planner (was Parking Slot
+ # Planner (PSP.))
+ # - `max_orig_path` -- maximum original path. I used this when comparing
+ # original paths but I had to copy the `max_orig_path` by hand from
+ # different scenario result.
+ # - `orig_path` -- the path before the optimization.
+ # - `max_path` -- the maximum path after optimization. Must be copied by
+ # hand.
+ # - `path` -- optimized path of the scenario.