Page 1 of 1

OpenSense ScapuloThoracic Model Issues

Posted: Tue Dec 08, 2020 11:02 am
by pklarich
Hello all,

I have been trying to calibrate the ScapulothorachicJoint_Shoulder model with some IMU data I have but have been running into the following issue when trying to place the IMUs (myIMUPlacer) and generate the calibrated model:

Object::newInstanceOfType(): object type 'ScapulothoracicJoint' is not a registered Object!
Object type ScapulothoracicJoint not recognized
Loaded model ScapulothoracicJoint_Shoulder from file ScapulothorachicJoint_Shoulder.osim
Couldn't find file 'lunate.vtp'.
Couldn't find file 'scaphoid.vtp'.
Couldn't find file 'pisiform.vtp'.
Couldn't find file 'triquetrum.vtp'.
Couldn't find file 'capitate.vtp'.
Couldn't find file 'trapezium.vtp'.
Couldn't find file 'trapezoid.vtp'.
Couldn't find file 'hamate.vtp'.
Couldn't find file '1mc.vtp'.
Couldn't find file '2mc.vtp'.
Couldn't find file '3mc.vtp'.
Couldn't find file '4mc.vtp'.
Couldn't find file '5mc.vtp'.
Couldn't find file 'thumbprox.vtp'.
Couldn't find file 'thumbdist.vtp'.
Couldn't find file '2proxph.vtp'.
Couldn't find file '2midph.vtp'.
Couldn't find file '2distph.vtp'.
Couldn't find file '3proxph.vtp'.
Couldn't find file '3midph.vtp'.
Couldn't find file '3distph.vtp'.
Couldn't find file '4proxph.vtp'.
Couldn't find file '4midph.vtp'.
Couldn't find file '4distph.vtp'.
Couldn't find file '5proxph.vtp'.
Couldn't find file '5midph.vtp'.
Couldn't find file '5distph.vtp'.
Heading correction computed to be -90.8604degs about ground Y
Body 'scapula' not connected by a Joint.
A FreeJoint will be added to connect it to ground.
Error using Model (line 6)
Java exception occurred:
java.lang.RuntimeException: CoordinateLimitForce: Invalid coordinate (scapula_upward_rot) specified in Actuator ScapulaRotationLimits

at org.opensim.modeling.opensimSimulationJNI.IMUPlacer_run__SWIG_0(Native Method)

at org.opensim.modeling.IMUPlacer.run(IMUPlacer.java:285)
I have tried running it using geometries from the MOBL_ARMS model, but I still get the same error minus the missing geometries. The most up-to-date ScapuloThoracic model utilizes a plugin and I'm not sure if this is where the issue lies or if there is an easy work around to it. The model is able to load in 4.1 with the plugin, while ignoring the missing geometries above (it only utilizes clavicle, groundspine, humerus, radius, scapula, thorax, and ulna). I have been unable to get an output calibrated model while trying to use the ScapuloThoracic model, but have had success using MOBL-Arms so the issue is very likely attributed to the .osim. I just am not sure how to solve the problem.

Any help would be appreciated.

- Paul

Re: OpenSense ScapuloThoracic Model Issues

Posted: Sat Dec 12, 2020 10:50 am
by aymanh
Hello,

The first line of the errors you reported indicates that the 'ScapulothoracicJoint' was not recognized, anything downstream from that is not relevant. Make sure the joint definition dll/library has been loaded first. The warning about vtp files is for your information only and can be fixed by placing the mesh files in a Geometry folder under the model file.

Hope this helps,
-Ayman

Re: OpenSense ScapuloThoracic Model Issues

Posted: Sun Jan 10, 2021 11:21 am
by pklarich
Thanks Ayman,

The issue I am having is within MatLab. I am trying to run the IMUplacer tool, but am not sure how to properly load the .dll within the Matlab environment. Below is the script I am trying to run and where the issue is arising.

% Import the OpenSim libraries
import org.opensim.modeling.*;

% Setup and run the IMUPlacer tool, with model visualization set to true
myIMUPlacer = IMUPlacer('PILOT27_Setup.xml');
myIMUPlacer.run(true);

% Write the calibrated model to file
myIMUPlacer.getCalibratedModel().print('ScapulothorachicJoint_Shoulder.osim');

Re: OpenSense ScapuloThoracic Model Issues

Posted: Sun Jan 10, 2021 5:37 pm
by tkuchida
There are detailed instructions for using plugins on the "Using Plugins" page in the documentation (https://simtk-confluence.stanford.edu/d ... ng+Plugins). See, in particular, the "Matlab" section.

Re: OpenSense ScapuloThoracic Model Issues

Posted: Sun Jan 10, 2021 7:36 pm
by pklarich
Thank you Thomas! Sorry I wasn't able to find that article on my own to answer my problems, should have dug harder.