Skip to content

Commit

Permalink
Merge pull request #761 from Ipuch/multimodel
Browse files Browse the repository at this point in the history
Multimodel, I need animation and displaced the file for more convinience
  • Loading branch information
pariterre committed Sep 21, 2023
2 parents f92fe6d + fff2432 commit 8bd8b05
Show file tree
Hide file tree
Showing 6 changed files with 1,158 additions and 974 deletions.
3 changes: 2 additions & 1 deletion bioptim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@
from .dynamics.fatigue.effort_perception import EffortPerception, TauEffortPerception
from .dynamics.ode_solver import OdeSolver, OdeSolverBase
from .interfaces.solver_options import Solver
from .interfaces.biorbd_model import BiorbdModel, MultiBiorbdModel
from .interfaces.biorbd_model import BiorbdModel
from .interfaces.multi_biorbd_model import MultiBiorbdModel
from .interfaces.biomodel import BioModel
from .interfaces.holonomic_biomodel import HolonomicBioModel
from .interfaces.variational_biomodel import VariationalBioModel
Expand Down
8 changes: 4 additions & 4 deletions bioptim/interfaces/biomodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def serialize(self) -> tuple[Callable, dict]:

@property
def friction_coefficients(self) -> MX:
"""Get the coeffient of friction to apply to specified elements in the dymamics"""
"""Get the coefficient of friction to apply to specified elements in the dynamics"""
return MX()

@property
Expand Down Expand Up @@ -80,7 +80,7 @@ def segments(self) -> tuple:
"""Get all segments"""
return ()

def homogeneous_matrices_in_global(self, q, reference_idx, inverse=False) -> tuple:
def homogeneous_matrices_in_global(self, q, segment_id, inverse=False) -> tuple:
"""
Get the homogeneous matrices of all segments in the world frame,
such as: P_R0 = T_R0_R1 * P_R1
Expand All @@ -89,9 +89,9 @@ def homogeneous_matrices_in_global(self, q, reference_idx, inverse=False) -> tup
P_R1 the position of any point P in the segment R1 frame.
"""

def homogeneous_matrices_in_child(self, *args) -> tuple:
def homogeneous_matrices_in_child(self, segment_id) -> MX:
"""
Get the homogeneous matrices of all segments in their parent frame,
Get the homogeneous matrices of one segment in its parent frame,
such as: P_R1 = T_R1_R2 * P_R2
with P_R1 the position of any point P in the segment R1 frame,
with P_R2 the position of any point P in the segment R2 frame,
Expand Down

0 comments on commit 8bd8b05

Please sign in to comment.