diff --git a/bioptim/dynamics/dynamics_functions.py b/bioptim/dynamics/dynamics_functions.py index 10d50897b..6f0330d7d 100644 --- a/bioptim/dynamics/dynamics_functions.py +++ b/bioptim/dynamics/dynamics_functions.py @@ -157,9 +157,7 @@ def torque_driven( if nlp.ode_solver.defects_type == DefectType.IMPLICIT: if not with_contact and fatigue is None: qddot = DynamicsFunctions.get(nlp.states_dot["qddot"], nlp.states_dot.scaled.cx) - tau_id = DynamicsFunctions.inverse_dynamics( - nlp, q, qdot, qddot, with_contact, external_forces - ) + tau_id = DynamicsFunctions.inverse_dynamics(nlp, q, qdot, qddot, with_contact, external_forces) defects = nlp.cx(dq.shape[0] + tau_id.shape[0], tau_id.shape[1]) dq_defects = []