- Millard.computeFiberEquilibrium(state, False)
- Millard.computeFiberEquilibrium(state, True)
Code: Select all
for i in range(nMuscles):
muscle = MuscleSet.get(i)
muscle.set_ignore_tendon_compliance(False)
Code: Select all
for i in range(nCoords):
coord = coord_set.get(i)
coord_value = q_data[j, i]
coord_speed = u_data[j, i]
coord.setValue(state, coord_value)
coord.setSpeedValue(state, coord_speed)
model.realizeVelocity(state)
Code: Select all
for i in range(nMuscles):
muscle = MuscleSet.get(i)
muscle.setActivation(state, activation_data.get(i))
Millard = osim.Millard2012EquilibriumMuscle.safeDownCast(muscle)
Millard.computeFiberEquilibrium(state, False)
# Millard.computeFiberEquilibrium(state, True)
Code: Select all
muscle_lengths = []
for i in range(nMuscles):
muscle = MuscleSet.get(i)
muscle_fiber_length = muscle.getFiberLength(state)
muscle_lengths.append(muscle_fiber_length)
print(",".join(map(str, muscle_lengths)))