Skip to content
Snippets Groups Projects
Commit 367c07ca authored by Ale's avatar Ale
Browse files

1KHz mpc (reduced model)

Open loop
EndEff tracking cost
Only Impedance
parent 523ae7a0
No related branches found
No related tags found
No related merge requests found
...@@ -96,15 +96,15 @@ class Controller: ...@@ -96,15 +96,15 @@ class Controller:
self.point_target = self.target.evaluate_in_t(1)[self.pd.rfFootId] self.point_target = self.target.evaluate_in_t(1)[self.pd.rfFootId]
try: 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 ## Trajectory tracking
#if self.initialized: if self.initialized:
# self.mpc.solve(self.k, self.mpc_result.x[1], self.guess) self.mpc.solve(self.k, self.mpc_result.x[1], self.guess)
#else: else:
# self.mpc.solve(self.k, m["x_m"], self.guess) self.mpc.solve(self.k, m["x_m"], self.guess)
# ### ONLY IF YOU WANT TO STORE THE FIRST SOLUTION TO WARMSTART THE INITIAL Problem ### ### ONLY IF YOU WANT TO STORE THE FIRST SOLUTION TO WARMSTART THE INITIAL Problem ###
#if not self.initialized: #if not self.initialized:
# np.save(open('/tmp/init_guess.npy', "wb"), {"xs": self.mpc.ocp.get_results().x, "us": self.mpc.ocp.get_results().u} ) # np.save(open('/tmp/init_guess.npy', "wb"), {"xs": self.mpc.ocp.get_results().x, "us": self.mpc.ocp.get_results().u} )
# print("Initial guess saved") # print("Initial guess saved")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment