I'm attempting to pull my model's muscle pathpoint locations using the Matlab API, but it keeps displaying an error as though that function is not appropriate for the AbstractPathPoints class.
My syntax is as follows
hModel = Model([sModelPath sModelFile]);
hModel.getMuscles.get(0).getGeometryPath.getPathPointSet.get(0).getLocation;
The getLocation function appears both when I query available methods for the class in Matlab as well as the online documentation:
https://simtk.org/api_docs/opensim/api_ ... Point.html
Also I can successfully pull the muscle pathpoint's name (using getName) and the class is properly displayed as AbstractPathPoint using the getClass function.
This script had previously worked in OpenSim 3.3 using the getLocationCoord method for the same class. We are now using 4.0.
Thanks.
getLocation() Matlab API bug
- Thomas Uchida
- Posts: 1790
- Joined: Wed May 16, 2012 11:40 am
Re: getLocation() Matlab API bug
The getLocation() method requires a State as an argument, which you are not providing. https://simtk.org/api_docs/opensim/api_ ... 46bf803b68
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: getLocation() Matlab API bug
Hi Russel,
getLocation method takes a state object as an rgument now. Also note that the method is on base class and may not be implemented for some types of PathPoints. This is a change from 3.3 API.
Hope this helps,
-Ayman
getLocation method takes a state object as an rgument now. Also note that the method is on base class and may not be implemented for some types of PathPoints. This is a change from 3.3 API.
Hope this helps,
-Ayman
- Russell Hardesty
- Posts: 3
- Joined: Thu Feb 05, 2015 10:51 am
Re: getLocation() Matlab API bug
RESOLVED:
That worked guys. Thank you very much.
That worked guys. Thank you very much.