Skip to content

Commit

Permalink
blacked
Browse files Browse the repository at this point in the history
  • Loading branch information
EveCharbie committed Oct 29, 2024
1 parent 12a35d8 commit 5a3fcf5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 1 addition & 3 deletions bioptim/dynamics/dynamics_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 0 additions & 1 deletion bioptim/limits/penalty.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
6 changes: 5 additions & 1 deletion bioptim/models/biorbd/holonomic_biorbd_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5a3fcf5

Please sign in to comment.