Skip to content
Snippets Groups Projects
Commit d4928374 authored by cbusato's avatar cbusato
Browse files

Revert "Change optimization variables from dxs to xs directly (bis)"

This reverts commit f447cf9a.
parent 2e74dd29
No related branches found
No related tags found
1 merge request!32Draft: Reverse-merge casadi-walking into new WBC devel branch
...@@ -71,6 +71,7 @@ class OCP: ...@@ -71,6 +71,7 @@ class OCP:
datas (list of NodeData): list of node data, one for each node of the OCP datas (list of NodeData): list of node data, one for each node of the OCP
opti (casadi.Opti): optimization problem wrapper opti (casadi.Opti): optimization problem wrapper
xs (vector): State trajectory (q + dq) xs (vector): State trajectory (q + dq)
dxs (vector): Derivative of state trajectory
a (vector): Acceleration slack trajectory a (vector): Acceleration slack trajectory
us (vector): Control trajectory (tau) us (vector): Control trajectory (tau)
fs (vector): Contact forces trajectories fs (vector): Contact forces trajectories
...@@ -203,6 +204,10 @@ class OCP: ...@@ -203,6 +204,10 @@ class OCP:
self.opti = opti self.opti = opti
# Optimization variables # 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.acs = [opti.variable(self.pd.nv) for _ in self.runningModels]
self.us = [opti.variable(self.pd.nu) 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])] self.xs = [opti.variable(self.pd.nx) for _ in (self.runningModels + [self.terminalModel])]
......
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