]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/commitdiff
Distinguish path segment (left/right/straight)
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 14 Mar 2023 14:58:41 +0000 (15:58 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 14 Mar 2023 14:58:41 +0000 (15:58 +0100)
scripts/plot_json_objects_scenario.py

index b8a4d163b04de60478adfb318e06891d1237f24b..ee51993600f435cd454040dd728607e59b16a422 100755 (executable)
@@ -728,7 +728,17 @@ if __name__ == "__main__":
     if ("path" in scenario and isinstance(scenario["path"], list)
             and len(scenario["path"]) > 0):
         plt.plot(*plot_nodes(scenario["path"]), color="blue")
+        i = 0
         for p in scenario["path"]:
+            if False and len(p) > 4:
+                if p[4] > 0:
+                    plt.plot(p[0] - MINX, p[1] - MINY, color="red", marker="+")
+                elif p[4] < 0:
+                    plt.plot(p[0] - MINX, p[1] - MINY, color="green", marker="x")
+                else:
+                    plt.plot(p[0] - MINX, p[1] - MINY, color="blue", marker=".")
+            else:
+                plt.plot(p[0] - MINX, p[1] - MINY, color="blue", marker="+")
             #plt.plot(*plot_car(p), color="blue")
             pass
             #cc = plot_car_corners(p)