Page 1 of 1

Model markers aren't found and marker rotations

Posted: Wed Feb 20, 2019 1:55 am
by saylee.p
hi,
I am using osimC3D.m utility and c3dExport.m example script for C3D extraction. But while using that trc file for scaling opensim gives an error as 'InverseKinematicSolver: Model has No Markers!'.
Also, if I try to preview the markers using preview the experimental data I can see the markers but with different rotation and translation.
How to change the rotation matrix in c3dExport.m to match the co-ordinate system? also how to translate the markers to match the model?

Note: I am using data collected using vicon nexus system and
Opensim 4.0
Matlab 2018b
Windows 7

Re: Scaling error using file extracted using 'c3dExport.m'

Posted: Wed Feb 20, 2019 7:41 am
by jimmy
But while using that trc file for scaling opensim gives an error as 'InverseKinematicSolver: Model has No Markers!'.
Sounds like your model doesn't have any markers on it, which makes it hard for the InverseKinematicsSolver to pose the model. You can see where the error is (intentionally) thrown in the source code, here. Perhaps add markers to your model?
Also, if I try to preview the markers using preview the experimental data I can see the markers but with different rotation and translation.
Have you looked into the example c3dExport Script where the rotation gets made?

Code: Select all

% Construct an opensimC3D object with input c3d path
% Constructor takes full path to c3d file and an integer for forceplate
% representation (1 = COP).
c3d = osimC3D(c3dpath,1);
....
%% Rotate the data
c3d.rotateData('x',-90)
If the rotation isn't what you want it to be, perhaps try to do other rotations, or no rotation, until it matches the rotation of your lab. The code doesn't make any translations-- when you open experimental data in the GUI, the GUI adds an offset. You can change that offset by right-clicking on the data
in GUI Navigator

Re: Scaling error using file extracted using 'c3dExport.m'

Posted: Wed Feb 20, 2019 9:52 am
by saylee.p
Sounds like your model doesn't have any markers on it, which makes it hard for the InverseKinematicsSolver to pose the model. You can see where the error is (intentionally) thrown in the source code, here. Perhaps add markers to your model?
I checked the .trc file it has markers(since I am using example data from Tim Dorn Gait Data to check the code). Still it is showing the same error. I didn't understand what to check in the source code. Also the preview of experimental data shows all the markers as well as the scaling tool shows the number of frames and markers.

and thank you for the suggestion, I was able to solve the rotation problem.

Note: In screenshots the .trc file used are before solving rotation problem.

Re: Scaling error using file extracted using 'c3dExport.m'

Posted: Wed Feb 20, 2019 9:58 am
by jimmy
There are no markers on the model. There are experimental markers (blue) and there are model markers (pink). Where are the markers that belong to the model?

Re: Model markers aren't found and marker rotations

Posted: Wed Feb 20, 2019 10:05 am
by saylee.p
Does this issue occurs if I don't add the .xml file in the scaling tool? Because I think that file is set as reference for scaling.

Re: Model markers aren't found and marker rotations

Posted: Wed Feb 20, 2019 10:20 am
by jimmy
Perhaps try to add the markers to the model to the model by expanding the model properties in the navigator, right clicking on the markers, and adding the markers from a file. Save the model and reopen to see if the models are there.

Re: Model markers aren't found and marker rotations

Posted: Thu Feb 21, 2019 11:24 pm
by saylee.p
Hi sir,
I added markers from the marker set but the problem still exists. In scaling tool window the static pose weights are not imported from the file. The run button thus, is not highlighted.