diff --git a/remote_control/control_commander.py b/remote_control/control_commander.py index c0eda01..799d0ea 100644 --- a/remote_control/control_commander.py +++ b/remote_control/control_commander.py @@ -57,8 +57,8 @@ class ControlCommander: if not all_detected: print(f"warning: no measurements available for the following robots: {undetected_robots}") time.sleep(0.5) + print("all robots detected -> starting control") - print("starting control") self.running = True while self.running: while not self.event_listener.event_queue.empty(): @@ -111,13 +111,13 @@ class ControlCommander: if __name__ == '__main__': id_ip_dict = { #11: '10.10.11.88', - 12: '192.168.1.12', + #12: '192.168.1.12', 13: '192.168.1.13', #14: '10.10.11.89', } # controller_type = {12: 'mpc', 13: 'pid'} - controller_type = 'pid' + controller_type = 'mpc' rc = ControlCommander(id_ip_dict, controller_type=controller_type) rc.run() diff --git a/remote_control/mpc_controller.py b/remote_control/mpc_controller.py index 89974d2..ae3d762 100644 --- a/remote_control/mpc_controller.py +++ b/remote_control/mpc_controller.py @@ -6,7 +6,7 @@ from casadi_opt import OpenLoopSolver class MPCController(ControllerBase): - def __init__(self, N=20, T=1.0): + def __init__(self, N=10, T=1.0): super().__init__() self.t = None