From 9aa6850092a24a1b80e217a694b06687806c9e18 Mon Sep 17 00:00:00 2001 From: Jiri Vlasak Date: Wed, 28 Jul 2021 14:12:06 +0200 Subject: [PATCH] Init can be pose range in plot scenario --- scripts/plot_json_objects_scenario.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/plot_json_objects_scenario.py b/scripts/plot_json_objects_scenario.py index 0f17a9d..9cc6ab4 100644 --- a/scripts/plot_json_objects_scenario.py +++ b/scripts/plot_json_objects_scenario.py @@ -407,6 +407,17 @@ if __name__ == "__main__": marker="+", ms=12 ) + if "init" in scenario and len(scenario["init"]) == 4: + plt.plot(*plot_car(scenario["init"]), color="red") + scenario["init"][2] = scenario["init"][3] + plt.plot(*plot_car(scenario["init"]), color="red") + plt.plot( + scenario["init"][0] - MINX, + scenario["init"][1] - MINY, + color="red", + marker="+", + ms=12 + ) if "entries" in scenario: for e in scenario["entries"]: plt.plot(*plot_car(e), color="orange") -- 2.39.2