Trying to update the state with motion's coordinates
Posted: Fri Dec 01, 2023 5:02 am
Hello everyone!
I'm trying to use this function https://github.com/modenaxe/MuscleForce ... athAsMat.m from Luca Modenese to extract the muscle path.
I'm encountering problems regarding the state. For now I've used only:
state = model.initSystem();
My goal is to get the muscle path updated according to the kinematics of the system, then introducing the motion. Then, I would like to extract the muscle path for each time instant of the motion.
I'm thinking to extract all the coordinates for each instant and then update the state with the new value of coordinates. But I don't know how to implement it because the functions that I've tried to use don't work.
I've tried in this way:
motionData = Storage('motion_file.mot');
stateVector = motionData.getStateVector();
state = model.updState();
model.setState(state, stateVector);
I always receive this message: Undefined function or variable.
Thanks in advance
I'm trying to use this function https://github.com/modenaxe/MuscleForce ... athAsMat.m from Luca Modenese to extract the muscle path.
I'm encountering problems regarding the state. For now I've used only:
state = model.initSystem();
My goal is to get the muscle path updated according to the kinematics of the system, then introducing the motion. Then, I would like to extract the muscle path for each time instant of the motion.
I'm thinking to extract all the coordinates for each instant and then update the state with the new value of coordinates. But I don't know how to implement it because the functions that I've tried to use don't work.
I've tried in this way:
motionData = Storage('motion_file.mot');
stateVector = motionData.getStateVector();
state = model.updState();
model.setState(state, stateVector);
I always receive this message: Undefined function or variable.
Thanks in advance