Page 1 of 1

Scaling with coordinate data for static pose

Posted: Sun Mar 10, 2013 4:41 am
by zheny
Hi!

I tried to scale model using coordinate data from motion capture software, in order to get a better scaling result.
But every time when I run the scale tool with coordinate data file, the program gets stack with "executing scaling". A message appears at the right corner of the program with a minus sign, saying "unexpected exception", "unable to create new native thread".

Does anyone know why the program is behaving like this?

Thanks

Re: Scaling with coordinate data for static pose

Posted: Mon Mar 11, 2013 1:02 am
by saxbyd
Hi,

I think many people have tried to use a coordinate file, but run into some trouble along the way.

Maybe it is best to apply the coordinates directly to the model via the API, then run the scaling commands?

David

Re: Scaling with coordinate data for static pose

Posted: Mon Mar 11, 2013 1:06 am
by zheny
Hi David!

Thanks for your reply, but I am really new to OpenSim, so I don't really know how to do that in API, can you please explain more?

Best regards,
Zhen

Re: Scaling with coordinate data for static pose

Posted: Mon Mar 11, 2013 1:21 am
by saxbyd
Hi,

If you take a look at the example matlab scripts in the release.
On my computer:

C:\OpenSim 3.0\sdk\Matlab\prescribeMotionInModel.m

In this function you provide a model, an sto file containing your joint angles (from some external source), and outputs a model with a corresponding set of angles.

Then you would need to use the ModelScaler method to set the parameters for scaling. This could be done using a generic/template xml file (which you can construct in the GUI or modify from the examples in the release), or you can get/set all the values for your purposes through the API.

I wasn't confident that I would be able to access and specify all my commands via the API, so I opted for a hybrid. I used a generic scaling template, but then instantiated the model and set specific parameters for each subject (i.e. height, weight, result directory, etc...).

David

Re: Scaling with coordinate data for static pose

Posted: Mon Mar 18, 2013 4:42 pm
by sunsyl
I met the same problem.

Re: Scaling with coordinate data for static pose

Posted: Tue Mar 19, 2013 12:42 am
by zheny
Hi Sunsyl,

I kind of solved problem by manually filling the values in the coordinate window.