Retrieve Visible Object Files Attached to Body Objects in MATLAB 4.0 API
Posted: Wed Jul 26, 2017 1:16 pm
Hello,
I am working on some MATLAB code which uses the OpenSim 4.0 API to read in an existing model, but I can't figure out how to get the visible object files associated with each body.
Right now I have:
But this doesn't return the path to the .vtp file I am expecting. Is there another way I should be doing this?
Thanks,
Connor Pyles
Johns Hopkins Applied Physics Lab
I am working on some MATLAB code which uses the OpenSim 4.0 API to read in an existing model, but I can't figure out how to get the visible object files associated with each body.
Right now I have:
Code: Select all
% Import opensim classes
import org.opensim.modeling.*
% Read in model from file
model_file = 'my_model_file.osim;
model = Model(model_file);
% Get a body
body = model.getBodySet().get(0);
% Get geometry
geometry = body.get_attached_geometry(0);
geometry.getAbsolutePathName
Thanks,
Connor Pyles
Johns Hopkins Applied Physics Lab