general refactoring
This commit is contained in:
parent
7ded3bee79
commit
a0f701fe83
|
@ -3,6 +3,7 @@ import time
|
|||
|
||||
from casadi_opt import OpenLoopSolver
|
||||
|
||||
|
||||
class MPCController:
|
||||
def __init__(self, estimator):
|
||||
self.t = time.time()
|
||||
|
@ -77,7 +78,6 @@ class MPCController:
|
|||
us2 = res[1] * self.control_scaling
|
||||
# print("u = {}", (us1, us2))
|
||||
|
||||
tmpc_end = time.time()
|
||||
# print("---------------- mpc solution took {} seconds".format(tmpc_end - tmpc_start))
|
||||
dt_mpc = time.time() - self.t
|
||||
if dt_mpc < self.dt: # wait until next control can be applied
|
||||
|
|
Loading…
Reference in New Issue
Block a user