Scaling with coordinate data for static pose

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Zhen Yang
Posts: 29
Joined: Fri Feb 24, 2012 11:48 am

Scaling with coordinate data for static pose

Post by Zhen Yang » Sun Mar 10, 2013 4:41 am

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

User avatar
David John Saxby
Posts: 83
Joined: Mon May 09, 2011 8:39 pm

Re: Scaling with coordinate data for static pose

Post by David John Saxby » Mon Mar 11, 2013 1:02 am

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

User avatar
Zhen Yang
Posts: 29
Joined: Fri Feb 24, 2012 11:48 am

Re: Scaling with coordinate data for static pose

Post by Zhen Yang » Mon Mar 11, 2013 1:06 am

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

User avatar
David John Saxby
Posts: 83
Joined: Mon May 09, 2011 8:39 pm

Re: Scaling with coordinate data for static pose

Post by David John Saxby » Mon Mar 11, 2013 1:21 am

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

User avatar
Yuliang Sun
Posts: 3
Joined: Mon Sep 17, 2012 8:09 am

Re: Scaling with coordinate data for static pose

Post by Yuliang Sun » Mon Mar 18, 2013 4:42 pm

I met the same problem.

User avatar
Zhen Yang
Posts: 29
Joined: Fri Feb 24, 2012 11:48 am

Re: Scaling with coordinate data for static pose

Post by Zhen Yang » Tue Mar 19, 2013 12:42 am

Hi Sunsyl,

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

POST REPLY