From: Jiri Vlasak Date: Mon, 27 Mar 2023 11:44:39 +0000 (+0200) Subject: Fix plot for various wheel angles in path X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hubacji1/path-to-traj.git/commitdiff_plain/2571dd08e783342f1aa98b162849666f43dd741d Fix plot for various wheel angles in path --- diff --git a/plot.py b/plot.py index d76c2a3..5339e99 100755 --- a/plot.py +++ b/plot.py @@ -733,7 +733,11 @@ if __name__ == "__main__": i = 0 for p in scenario["path"]: if len(p) > 5: - pc = {36: "red", 0: "blue", -36: "green"} + pc = "blue" + if p[4] > 0: + pc = "red" + elif p[4] < 0: + pc = "green" pm = "o" if p[5] else "+" plt.plot(p[0] - MINX, p[1] - MINY, color=pc[p[4]], marker=pm) #plt.plot(*plot_car(p), color="blue")