]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/commitdiff
Plot nodes when contained in JSON output
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Fri, 27 Sep 2019 08:20:14 +0000 (10:20 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Fri, 27 Sep 2019 08:20:15 +0000 (10:20 +0200)
scripts/plot_json_objects_scenario.py

index 2f90c9bdf6de089eee249d9ef9114e6944aa619d..7da3b37c6f6434bfdf4c1b53bc6640e21b25251b 100644 (file)
@@ -102,6 +102,15 @@ if __name__ == "__main__":
     ax.set_xlabel("x [m]")
     ax.set_ylabel("y [m]")
 
+    if "nodes_x" in scenario and "nodes_y" in scenario:
+        plt.plot(
+            scenario["nodes_x"],
+            scenario["nodes_y"],
+            color="lightgray",
+            marker="o",
+            ms=2,
+            lw=0,
+        )
     if "obst" in scenario and  len(scenario["obst"]) > 0:
         for o in scenario["obst"]:
             plt.plot(*plot_nodes(o), color="blue")