Skip to content
Snippets Groups Projects
Commit 21381543 authored by odri's avatar odri
Browse files

Do not try to display solo3D data if it is disabled

parent 31d8c76c
No related branches found
No related tags found
1 merge request!27Devel pa fixes
......@@ -380,24 +380,18 @@ class LoggerControl:
t_range = np.array([k * self.dt for k in range(self.tstamps.shape[0])])
plt.figure()
plt.plot(t_range, self.t_mip, "+", color="gold")
if self.solo3d:
plt.plot(t_range, self.t_mip, "+", color="gold")
plt.plot(t_range, self.loop_t_filter, "r+")
plt.plot(t_range, self.loop_t_planner, "g+")
plt.plot(t_range, self.loop_t_mpc, "b+")
plt.plot(t_range, self.loop_t_wbc, "+", color="violet")
plt.plot(t_range, self.loop_t_loop, "k+")
plt.plot(t_range, self.loop_t_loop_if, "+", color="rebeccapurple")
plt.legend(
[
"SurfacePlanner",
"Estimator",
"Planner",
"MPC",
"WBC",
"Control loop",
"Whole loop",
]
)
lgd = ["Estimator", "Planner", "MPC", "WBC", "Control loop", "Whole loop"]
if self.solo3d:
lgd = ["SurfacePlanner"] + lgd
plt.legend(lgd)
plt.xlabel("Time [s]")
plt.ylabel("Time [s]")
self.custom_suptitle("Computation time of each block")
......@@ -986,7 +980,8 @@ class LoggerControl:
self.plotTimes()
self.plotMpcTime()
self.plotSurfacePlannerTime()
if self.solo3d:
self.plotSurfacePlannerTime()
self.plotStepTime()
self.plotMPCCost()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment