From 9d633f36eb0ed2a2a51229cf2ba189ff72a49cea Mon Sep 17 00:00:00 2001 From: Brandon Sutherland Date: Fri, 12 Apr 2024 11:54:14 -0600 Subject: [PATCH] fixed bug with get_optimization_status --- rosplane_tuning/src/autotune/optimizer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rosplane_tuning/src/autotune/optimizer.py b/rosplane_tuning/src/autotune/optimizer.py index 86e8169..30129f5 100644 --- a/rosplane_tuning/src/autotune/optimizer.py +++ b/rosplane_tuning/src/autotune/optimizer.py @@ -66,9 +66,11 @@ def get_optimization_status(self): """ if self.state == OptimizerState.UNINITIALIZED: return "Optimizer awaiting first iteration." + elif self.state == OptimizerState.FIRST_ITERATION: + return "First iteration." elif self.state == OptimizerState.OPTIMIZING: return "Optimizing." - elif self.state == OptimizerState.TERMINATED: + else: # self.state == OptimizerState.TERMINATED: return str(self.reason) + " Final gains: " + str(self.x) def get_next_parameter_set(self, error):