From 9b45c5adbac1b8689f61b17c1852bb8f225c75d3 Mon Sep 17 00:00:00 2001
From: Ale <alessandroassirell98@gmail.com>
Date: Fri, 22 Jul 2022 11:49:28 +0200
Subject: [PATCH] 1KHz mpc closed loop impedance

---
 python/quadruped_reactive_walking/Controller.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/python/quadruped_reactive_walking/Controller.py b/python/quadruped_reactive_walking/Controller.py
index 0d03a2d6..a9669d59 100644
--- a/python/quadruped_reactive_walking/Controller.py
+++ b/python/quadruped_reactive_walking/Controller.py
@@ -92,13 +92,13 @@ class Controller:
         m = self.read_state(device)
 
         try:
-            #self.mpc.solve(self.k, m['x_m'], self.guess) # Closed loop mpc
+            self.mpc.solve(self.k, m['x_m'], self.guess) # Closed loop mpc
 
             # Trajectory tracking
-            if self.initialized:
-                self.mpc.solve(self.k, self.mpc_result.x[1], self.guess)
-            else:
-                self.mpc.solve(self.k, m["x_m"], self.guess)
+            #if self.initialized:
+            #    self.mpc.solve(self.k, self.mpc_result.x[1], self.guess)
+            #else:
+            #    self.mpc.solve(self.k, m["x_m"], self.guess)
 
         except ValueError:
             self.error = True
-- 
GitLab