Matlab api ConditionalPathPoint
Posted: Thu Jul 14, 2016 2:21 am
Dear all,
For the subject specific models that we are creating using the geometry of the subject I want to change the range of conditional pathpoint using the matlab opensim api. So the muscle attachment sites on the patella but also the gastocnemius muscle are using conditional pathpoints that are active in a certain range of the knee flexion angle. So I calculated a the angle on which all three points are on one line and now I want to set this value using the OpenSim API. So I made a loop through all the muscle attachment points in the model and if it is a conditional pathpoint in the list I use the following code to set the 'new' maximal range. Unfortunately it is not working
LocationPathPoint = char(CurrentPathPoint.getLocation);
LocationPathPoint2 = str2num(LocationPathPoint(3:end-1));
P=LocationPathPoint2;
ConditionalPathPoint= ConditionalPathPoint.safeDownCast(CurrentPathPoint);
range=char(ConditionalPathPoint.getRange());
range2=str2num(range);
ConditionalPathPoint.setRangeMax(State,params.CPangle_rad(t))
Matlab gives me an error in the last step
K>> ConditionalPathPoint.setRangeMax(State,params.CPangle_rad(t))
No appropriate method, property, or field setRangeMax for class
org.opensim.modeling.ConditionalPathPoint.
So I tried a couple of things but I cannot figure out what is going wrong...
Any help with it would be highly appreciated The other solution is to change them manually
For the subject specific models that we are creating using the geometry of the subject I want to change the range of conditional pathpoint using the matlab opensim api. So the muscle attachment sites on the patella but also the gastocnemius muscle are using conditional pathpoints that are active in a certain range of the knee flexion angle. So I calculated a the angle on which all three points are on one line and now I want to set this value using the OpenSim API. So I made a loop through all the muscle attachment points in the model and if it is a conditional pathpoint in the list I use the following code to set the 'new' maximal range. Unfortunately it is not working
LocationPathPoint = char(CurrentPathPoint.getLocation);
LocationPathPoint2 = str2num(LocationPathPoint(3:end-1));
P=LocationPathPoint2;
ConditionalPathPoint= ConditionalPathPoint.safeDownCast(CurrentPathPoint);
range=char(ConditionalPathPoint.getRange());
range2=str2num(range);
ConditionalPathPoint.setRangeMax(State,params.CPangle_rad(t))
Matlab gives me an error in the last step
K>> ConditionalPathPoint.setRangeMax(State,params.CPangle_rad(t))
No appropriate method, property, or field setRangeMax for class
org.opensim.modeling.ConditionalPathPoint.
So I tried a couple of things but I cannot figure out what is going wrong...
Any help with it would be highly appreciated The other solution is to change them manually