Skip to content

Commit 19fd7f2

Browse files
committed
Small fix
1 parent 8208946 commit 19fd7f2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

examples/example_4_physics_simulation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ def main():
256256
params=ik_sol_params,
257257
)
258258

259-
oMf_lf_tgt = pin.SE3(oMf_lf_tgt.rotation, lf_path[k + 1])
260-
259+
if phases[k + 1] > 0.0:
260+
oMf_lf_tgt = pin.SE3(oMf_lf_tgt.rotation, lf_path[k + 1])
261261
else:
262262
ik_sol_params.fixed_foot_frame = talos.left_foot_id
263263
ik_sol_params.moving_foot_frame = talos.right_foot_id
@@ -272,7 +272,8 @@ def main():
272272
params=ik_sol_params,
273273
)
274274

275-
oMf_rf_tgt = pin.SE3(oMf_rf_tgt.rotation, rf_path[k + 1])
275+
if phases[k + 1] < 0.0:
276+
oMf_rf_tgt = pin.SE3(oMf_rf_tgt.rotation, rf_path[k + 1])
276277

277278
simulator.apply_joints_pos_to_robot(q_des)
278279

0 commit comments

Comments
 (0)