]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Plot sample's frame if defined
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Wed, 26 Sep 2018 11:51:32 +0000 (13:51 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Wed, 26 Sep 2018 11:51:52 +0000 (13:51 +0200)
plot.py

diff --git a/plot.py b/plot.py
index 94f007ff97a84cce7f19f77d7735cffb8ef47d6e..05aa9c33e583813e8cae802e5aca8da0bbc652c9 100644 (file)
--- a/plot.py
+++ b/plot.py
@@ -161,8 +161,12 @@ if __name__ == "__main__":
             print("No edges")
     if PLOT["sample"]:
         try:
-            plt.plot(*plot_nodes(t["samp"]), color=COLOR["sample"],
-                    marker=".", linestyle = "None")
+            if PLOT["frame"]:
+                for i in t["samp"]:
+                    plt.plot(*car_frame(i), color=COLOR["sample"])
+            else:
+                plt.plot(*plot_nodes(t["samp"]), color=COLOR["sample"],
+                        marker=".", linestyle = "None")
         except:
             print("No RRTSample")
     if PLOT["path"]: