Skip to content

Commit e5527f8

Browse files
author
earlaud
committed
Minor fix in centroidal example
1 parent 7b27c34 commit e5527f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/talos_centroidal.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@
194194
forces_next = mpc.us[0][: nk * force_size]
195195

196196
for sub_step in range(N_simu):
197+
t = step * dt_mpc + sub_step * dt_simu
198+
197199
q_meas, v_meas = device.measureState()
198200
x_measured = np.concatenate([q_meas, v_meas])
199201

@@ -208,6 +210,7 @@
208210
forces_interp = forces_interp.reshape(2,6)
209211
forces_interp = [forces_interp[i, :] for i in range(2)]
210212

211-
tau_cmd = centroidal_ID.setTarget(pos_com_interp, v_com, feet_ref_interp, feet_velocity, contact_states, forces_interp)
213+
centroidal_ID.setTarget(pos_com_interp, v_com, feet_ref_interp, feet_velocity, contact_states, forces_interp)
214+
tau_cmd = centroidal_ID.solve(t, q_meas, v_meas)
212215

213216
device.execute(tau_cmd)

0 commit comments

Comments
 (0)