diff --git a/bioptim/dynamics/dynamics_functions.py b/bioptim/dynamics/dynamics_functions.py index 3bef7beba..cb6bda67f 100644 --- a/bioptim/dynamics/dynamics_functions.py +++ b/bioptim/dynamics/dynamics_functions.py @@ -1118,9 +1118,7 @@ def holonomic_torque_driven( q_u = DynamicsFunctions.get(nlp.states["q_u"], states) qdot_u = DynamicsFunctions.get(nlp.states["qdot_u"], states) tau = DynamicsFunctions.get(nlp.controls["tau"], controls) - q_v_init = DM.zeros( - nlp.model.nb_dependent_joints - ) + q_v_init = DM.zeros(nlp.model.nb_dependent_joints) qddot_u = nlp.model.partitioned_forward_dynamics()(q_u, qdot_u, q_v_init, tau) return DynamicsEvaluation(dxdt=vertcat(qdot_u, qddot_u), defects=None) diff --git a/bioptim/limits/penalty.py b/bioptim/limits/penalty.py index 8f31a4957..621d49177 100644 --- a/bioptim/limits/penalty.py +++ b/bioptim/limits/penalty.py @@ -1053,7 +1053,6 @@ def minimize_segment_velocity( return segment_angular_velocity[axes] - @staticmethod def state_continuity(penalty: PenaltyOption, controller: PenaltyController | list): if controller.control_type in ( diff --git a/bioptim/models/biorbd/holonomic_biorbd_model.py b/bioptim/models/biorbd/holonomic_biorbd_model.py index b8cf9f49f..9a24425ed 100644 --- a/bioptim/models/biorbd/holonomic_biorbd_model.py +++ b/bioptim/models/biorbd/holonomic_biorbd_model.py @@ -410,7 +410,11 @@ def _compute_qdot_v(self) -> Function: q = self.compute_q()(self.q_u, self.q_v_init) biorbd_return = self.compute_qdot_v()(q, self.qdot_u) casadi_fun = Function( - "compute_qdot_v", [self.q_u, self.qdot_u, self.q_v_init], [biorbd_return], ["q_u", "qdot_u", "q_v_init"], ["qdot_v"] + "compute_qdot_v", + [self.q_u, self.qdot_u, self.q_v_init], + [biorbd_return], + ["q_u", "qdot_u", "q_v_init"], + ["qdot_v"], ) return casadi_fun