You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, a muscle model typically has a force-length-velocity (FLV) function which determines how its force output relates to kinematic variables. This function is typically a composite of several different force functions; e.g. force-length, force-velocity, passive force. Sometimes, only one of these functions changes between implementations. Therefore the composition of muscle models is dependency-inverted so that it's easier to swap out specific components.
Here's an example of construction of a VirtualMuscle model:
"""Virtual Muscle Model parameters used by Todorov & Li, 2004."""
TODOROV_LI_VIRTUALMUSCLE_PARAMS=dict(
force_length=dict(
beta=1.93, # slow/fast avg
omega=1.03, # slow/fast avg is 1.035
rho=1.87, # slow/fast avg
),
force_velocity=dict(
a_v=(-3.12, 4.21, -2.67), # slow/fast avg
b_v=0.62, # slow/fast avg
v_max=-5.72, # slow/fast avg is -5.725
),
force_passive_2=dict( # identical for slow/fast
c2=-0.02,
k2=-18.7,
l_r2=0.79,
),
shorten=dict(
c_v=(1.38, 2.09), # slow/fast avg is (1.335, 2.085)
),
activation=dict(
n_f=(2.11, 4.16), # slow/fast avg (2.11, 4.155),
a_f=0.56,
),
#! unused
force_passive_1=dict(
c1=0.0,
k1=1.0,
l_r1=0.0,
),
)
Is there a better way to instantiate these models? Note that currently, the muscle components (like VirtualMuscleForceLength and VirtualMuscleForcePassive) do not have default values for their fields.
The text was updated successfully, but these errors were encountered:
The composition of the models in
feedbax.mechanics.muscle
is the most complicated in the library.Class diagram of
feedbax.mechanics.muscle
For example, a muscle model typically has a force-length-velocity (FLV) function which determines how its force output relates to kinematic variables. This function is typically a composite of several different force functions; e.g. force-length, force-velocity, passive force. Sometimes, only one of these functions changes between implementations. Therefore the composition of muscle models is dependency-inverted so that it's easier to swap out specific components.
Here's an example of construction of a
VirtualMuscle
model:feedbax/feedbax/mechanics/muscle.py
Lines 605 to 640 in b73dfb8
The default parameters are defined as a dict:
feedbax/feedbax/mechanics/muscle.py
Lines 505 to 535 in b73dfb8
Is there a better way to instantiate these models? Note that currently, the muscle components (like
VirtualMuscleForceLength
andVirtualMuscleForcePassive
) do not have default values for their fields.The text was updated successfully, but these errors were encountered: