print("{}: {}".format(a["f"], v[a["f"]]))
if __name__ == "__main__":
- plt.rcParams["font.size"] = 29
- res = []
- for d in listdir("testlog"):
- LOGF="testlog/{}".format(d)
- r = {}
- for sf in [i["f"] for i in LOG]:
- r[sf] = load_trajectories("{}/{}".format(LOGF, sf))
- res.append({
- "f": d,
- "elap": get_val_if_exist(r["T2"], "elap"),
- "rrte": get_val_if_exist(r["T2"], "rrte"),
- "ppse": get_val_if_exist(r["T2"], "ppse"),
- })
-
- fig = plt.figure()
- ax = fig.add_subplot(111)
- ax.set_title("Elapsed time for different parking slot lenghts")
-
- ax.set_ylabel("Time [s]")
- ax.set_xlabel("Parking slot length [m]")
- plt.plot(
- [float(r["f"].split("_")[1]) for r in res],
- [mean_conf_int(r["elap"])[0] for r in res],
- color = 'r',
- label = 'Overall',
- )
- plt.plot(
- [float(r["f"].split("_")[1]) for r in res],
- [mean_conf_int(r["rrte"])[0] for r in res],
- color = 'b',
- label = 'RRT',
- )
- plt.plot(
- [float(r["f"].split("_")[1]) for r in res],
- [mean_conf_int(r["ppse"])[0] for r in res],
- color = 'g',
- label = 'Slot Planner',
- )
-
- plt.legend()
- plt.show()
+ r = {}
+ for sf in [i["f"] for i in LOG]:
+ r[sf] = load_trajectories("{}/{}".format(LOGF, sf))
+ print_successrate()
+ plot_maxtime()
+ plot_costdist()