different state size
Posted: Fri Jan 29, 2016 9:14 am
Hello all,
I am using, similar to the DynamicWalkingStarter, Matlab to do the integration of my OS model. However, I use time delayed signals in the simulation, which means that I get a vector with delayed states and I need to known which state is in what index. In the tread (https://simtk.org/forums/viewtopic.php? ... mes#p12925) there is already the warning that the sequence of the state that you get with 'state.getY()' can be different from the sequence you get with 'model.getStateVariable()'. I think I can work around this for the time being.
However, an issue I cannot understand, is that they seem to have different number of states:
The result is that st indicates 27 states, and nrS returns 26. Does anybody know what this extra state is, and where I might find additional information?
---- update ---
I found that the state in simbody uses the quaternions, which give me the extra state. In simbody's user guide it is stated that you can use Euler angles by setting setUseEulerAngles() on the SimbodyMatterSubsystem. Can this be done from Matlab?
Thanks in advance
Bas
I am using, similar to the DynamicWalkingStarter, Matlab to do the integration of my OS model. However, I use time delayed signals in the simulation, which means that I get a vector with delayed states and I need to known which state is in what index. In the tread (https://simtk.org/forums/viewtopic.php? ... mes#p12925) there is already the warning that the sequence of the state that you get with 'state.getY()' can be different from the sequence you get with 'model.getStateVariable()'. I think I can work around this for the time being.
However, an issue I cannot understand, is that they seem to have different number of states:
Code: Select all
osimModel = Model('underArm_bounce.osim');
osimModel.buildSystem();
st = osimModel.initializeState();
st.getNY
nrS = osimModel.getStateVariableNames().size()
---- update ---
I found that the state in simbody uses the quaternions, which give me the extra state. In simbody's user guide it is stated that you can use Euler angles by setting setUseEulerAngles() on the SimbodyMatterSubsystem. Can this be done from Matlab?
Thanks in advance
Bas