Add superstructure goal plot
Signed-off-by: Milind Upadhyay <milind.upadhyay@gmail.com>
Change-Id: I3b7ab60fe0ad49231b8662cc548d5cb9dead47ab
diff --git a/y2022/control_loops/superstructure/superstructure_plotter.ts b/y2022/control_loops/superstructure/superstructure_plotter.ts
index 5a1537e..8590d7b 100644
--- a/y2022/control_loops/superstructure/superstructure_plotter.ts
+++ b/y2022/control_loops/superstructure/superstructure_plotter.ts
@@ -50,6 +50,16 @@
.setColor(PINK)
.setPointSize(1.0);
+ const goalPlot =
+ aosPlotter.addPlot(element, [DEFAULT_WIDTH, DEFAULT_HEIGHT / 2]);
+ goalPlot.plot.getAxisLabels().setTitle('Goal');
+ goalPlot.plot.getAxisLabels().setXLabel(TIME);
+ goalPlot.plot.getAxisLabels().setYLabel('value');
+ goalPlot.plot.setDefaultYRange([-1.0, 2.0]);
+ goalPlot.addMessageLine(goal, ['fire']).setColor(RED).setPointSize(1.0);
+ goalPlot.addMessageLine(goal, ['auto_aim']).setColor(BLUE).setPointSize(1.0);
+
+
const shotCountPlot =
aosPlotter.addPlot(element, [DEFAULT_WIDTH, DEFAULT_HEIGHT / 2]);
shotCountPlot.plot.getAxisLabels().setTitle('Shot Count');