Skip to content

Commit

Permalink
fix: concatenate to evaluate contact force function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ipuch committed Jul 16, 2024
1 parent 12eed85 commit e3e2423
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bioptim/dynamics/configure_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ def configure_lagrange_multipliers_function(ocp, nlp, dyn_func: Callable, **extr

all_multipliers_names = [f"lagrange_multiplier_{name}" for name in all_multipliers_names]
all_multipliers_names_in_phase = [
f"lagrange_multiplier_{nlp.model.name_dof[i]}" for i in range(nlp.model.nb_dependent_joints)
f"lagrange_multiplier_{nlp.model.name_dof[i]}" for i in nlp.model.dependent_joint_index
]

axes_idx = BiMapping(
Expand Down Expand Up @@ -1343,7 +1343,7 @@ def configure_contact_function(ocp, nlp, dyn_func: Callable, **extra_params):

nlp.plot["contact_forces"] = CustomPlot(
lambda t0, phases_dt, node_idx, x, u, p, a, d: nlp.contact_forces_func(
[t0, t0 + phases_dt[nlp.phase_idx]], x, u, p, a, d
np.concatenate([t0, t0 + phases_dt[nlp.phase_idx]]), x, u, p, a, d
),
plot_type=PlotType.INTEGRATED,
axes_idx=axes_idx,
Expand Down

0 comments on commit e3e2423

Please sign in to comment.