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
Scaling with coordinate data for static pose
- David John Saxby
- Posts: 83
- Joined: Mon May 09, 2011 8:39 pm
Re: Scaling with coordinate data for static pose
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
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
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
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
- David John Saxby
- Posts: 83
- Joined: Mon May 09, 2011 8:39 pm
Re: Scaling with coordinate data for static pose
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
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
- Yuliang Sun
- Posts: 3
- Joined: Mon Sep 17, 2012 8:09 am
Re: Scaling with coordinate data for static pose
I met the same problem.
Re: Scaling with coordinate data for static pose
Hi Sunsyl,
I kind of solved problem by manually filling the values in the coordinate window.
I kind of solved problem by manually filling the values in the coordinate window.