Getting muscle path information in Matlab
Posted: Mon Jun 24, 2013 10:13 am
Hi All,
I am trying to get muscle path information out of a model via Matlab. I am able to get the path point set with something like:
aMuscleGeometry = aMuscle.getGeometryPath();
aPathPointSet = aMuscleGeometry.getPathPointSet();
and then can get information, e.g. body name and location, for muscle "n":
Body = aPathPointSet.get(n).getBodyName
Location = ArrayDouble.getValuesFromVec3(aPathPointSet.get(n).getLocation())
However, what I'd really like to get is the "current" muscle path, including wrapping points if present. I've tried using "getCurrentPath", i.e.:
CurrentPath = aMuscleGeometry.getCurrentPath(state);
This seems to work, but I can't figure out how to get actual path point information (body or location) at this point.
"CurrentPath.get(n).getLocation()" returns an error.
Unfortunately I'm not well versed in java. I suspect there's something very basic that I'm missing, but I haven't been able to figure out what. Thoughts?
Thanks,
Dennis
I am trying to get muscle path information out of a model via Matlab. I am able to get the path point set with something like:
aMuscleGeometry = aMuscle.getGeometryPath();
aPathPointSet = aMuscleGeometry.getPathPointSet();
and then can get information, e.g. body name and location, for muscle "n":
Body = aPathPointSet.get(n).getBodyName
Location = ArrayDouble.getValuesFromVec3(aPathPointSet.get(n).getLocation())
However, what I'd really like to get is the "current" muscle path, including wrapping points if present. I've tried using "getCurrentPath", i.e.:
CurrentPath = aMuscleGeometry.getCurrentPath(state);
This seems to work, but I can't figure out how to get actual path point information (body or location) at this point.
"CurrentPath.get(n).getLocation()" returns an error.
Unfortunately I'm not well versed in java. I suspect there's something very basic that I'm missing, but I haven't been able to figure out what. Thoughts?
Thanks,
Dennis