Skip to content
Snippets Groups Projects
Commit f1948995 authored by Fanny Risbourg's avatar Fanny Risbourg
Browse files

use the measured q and v

parent 4486e653
No related branches found
No related tags found
No related merge requests found
Pipeline #20766 failed
...@@ -163,7 +163,7 @@ class Controller: ...@@ -163,7 +163,7 @@ class Controller:
if self.params.interpolate_mpc: if self.params.interpolate_mpc:
q, v = self.interpolate_x(self.cnt_wbc * self.pd.dt_wbc) q, v = self.interpolate_x(self.cnt_wbc * self.pd.dt_wbc)
else: else:
q, v = self.integrate_x() q, v = self.integrate_x(m)
self.q[3:6] = q self.q[3:6] = q
self.v[3:6] = v self.v[3:6] = v
...@@ -323,13 +323,13 @@ class Controller: ...@@ -323,13 +323,13 @@ class Controller:
return q_t, v_t return q_t, v_t
def integrate_x(self): def integrate_x(self, m):
""" """
Integrate the position and velocity using the acceleration computed from the Integrate the position and velocity using the acceleration computed from the
feedforward torque feedforward torque
""" """
q0 = self.result.q_des[3:6] q0 = m["qj_m"][3:6]
v0 = self.result.v_des[3:6] v0 = m["vj_m"][3:6]
a = pin.aba(self.pd.model, self.pd.rdata, q0, v0, self.result.tau_ff[3:6]) a = pin.aba(self.pd.model, self.pd.rdata, q0, v0, self.result.tau_ff[3:6])
......
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