I am currently trying to convert a file backwards from 4.2 to 3.3 for use in SCONE.
I have taken a pre existing gait model and loaded it into MATLAB. In 4.2 I used the following command to load the bodies in as variables so that I could make additions to them.
Code: Select all
% BodyList = osimList2MatlabCell(model,'Body'); % Get a cell array of references to all the bodies in a model
Code: Select all
BodyList{1} = model.getObjectByTypeAndName('Body','pelvis');
Code: Select all
exoJoint{1} = WeldJoint();
exoJoint{1}.setName('Exo_Anchor_Pelvis');
exoJoint{1}.setParentBody(exoBody{1});
exoJoint{1}.setLocationInParent(locationInParent);
exoJoint{1}.setOrientationInParent(orientationInParent);
exoJoint{1}.setBody(BodyList{1});
% exoJoint{1}.setLocationInChild(locationInChild);
% exoJoint{1}.setOrientationInChild(orientationInChild);
Check for missing argument or incorrect argument data type in call to function 'setBody'.
Is this due to the fact the imported bodies have been saved as OpenSimObjects? and if so is there a way of importing them differently or converting the data type to a body?
Thank you for your help,
Rory Turnbull