From d492837494d2f9b1013d7d780b1b12a77dddf35c Mon Sep 17 00:00:00 2001 From: cbusato <busatoclement@gmail.com> Date: Mon, 27 Feb 2023 11:11:48 +0100 Subject: [PATCH] Revert "Change optimization variables from dxs to xs directly (bis)" This reverts commit f447cf9abe191fa427cfbfa89c84331d0e27ddc0. --- python/quadruped_reactive_walking/WB_MPC/CasadiOCP.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/quadruped_reactive_walking/WB_MPC/CasadiOCP.py b/python/quadruped_reactive_walking/WB_MPC/CasadiOCP.py index 0d30c307..cb1ac42b 100644 --- a/python/quadruped_reactive_walking/WB_MPC/CasadiOCP.py +++ b/python/quadruped_reactive_walking/WB_MPC/CasadiOCP.py @@ -71,6 +71,7 @@ class OCP: datas (list of NodeData): list of node data, one for each node of the OCP opti (casadi.Opti): optimization problem wrapper xs (vector): State trajectory (q + dq) + dxs (vector): Derivative of state trajectory a (vector): Acceleration slack trajectory us (vector): Control trajectory (tau) fs (vector): Contact forces trajectories @@ -203,6 +204,10 @@ class OCP: self.opti = opti # Optimization variables + self.dxs = [ + opti.variable(self.pd.ndx) + for _ in self.runningModels + [self.terminalModel] + ] self.acs = [opti.variable(self.pd.nv) for _ in self.runningModels] self.us = [opti.variable(self.pd.nu) for _ in self.runningModels] self.xs = [opti.variable(self.pd.nx) for _ in (self.runningModels + [self.terminalModel])] -- GitLab