Page 1 of 1
.mot
Posted: Sun Sep 20, 2020 6:40 am
by hamed1994
Hello,
this is the code for the arm26 model running in MATLAB environment.
Code: Select all
import org.opensim.modeling.*
arm = Model('C:\OpenSim 4.1\Models\Arm26\arm26.osim');
arm.setUseVisualizer(true);
state = arm.initSystem();
viz = arm.updVisualizer().updSimbodyVisualizer();
viz.setBackgroundColor(Vec3(0)); % white
viz.setGroundHeight(-2)
% Simulate.
manager = Manager(arm);
state.setTime(0);
manager.initialize(state);
state = manager.integrate(10.0);
how can I load motion file to it ?
can anyone help me with this.
thank you, Best
Hamed
Re: .mot
Posted: Mon Sep 21, 2020 5:26 am
by hamed1994
hamed1994 wrote: ↑Sun Sep 20, 2020 6:40 am
Hello,
this is the code for the arm26 model running in MATLAB environment.
Code: Select all
import org.opensim.modeling.*
arm = Model('C:\OpenSim 4.1\Models\Arm26\arm26.osim');
arm.setUseVisualizer(true);
state = arm.initSystem();
viz = arm.updVisualizer().updSimbodyVisualizer();
viz.setBackgroundColor(Vec3(0)); % white
viz.setGroundHeight(-2)
% Simulate.
manager = Manager(arm);
state.setTime(0);
manager.initialize(state);
state = manager.integrate(10.0);
how can I load motion file to it ?
can anyone help me with this.
thank you, Best
Hamed
hello,
can anyone help me with this please ?
thank you
Re: .mot
Posted: Mon Sep 21, 2020 7:17 pm
by tkuchida
What do you mean "load motion file to it"? If you are trying to set the pose of the model, you can read a motion file and set each coordinate.
Re: .mot
Posted: Mon Sep 21, 2020 11:26 pm
by hamed1994
tkuchida wrote: ↑Mon Sep 21, 2020 7:17 pm
What do you mean "load motion file to it"? If you are trying to set the pose of the model, you can read a motion file and set each coordinate.
yes, I mean reading the motion file.
how can I do it?
Re: .mot
Posted: Tue Sep 22, 2020 12:44 am
by tkuchida
I mean reading the motion file. how can I do it?
Please see the "prescribeMotionInModel.m" example in your Resources\Code\Matlab directory. This file is mentioned on the "Scripting with Matlab" page in the documentation, which may also be helpful if you haven't seen it yet:
https://simtk-confluence.stanford.edu/d ... ith+Matlab.
Re: .mot
Posted: Mon Oct 05, 2020 5:41 am
by hamed1994
tkuchida wrote: ↑Tue Sep 22, 2020 12:44 am
I mean reading the motion file. how can I do it?
Please see the "prescribeMotionInModel.m" example in your Resources\Code\Matlab directory. This file is mentioned on the "Scripting with Matlab" page in the documentation, which may also be helpful if you haven't seen it yet:
https://simtk-confluence.stanford.edu/d ... ith+Matlab.
hello
thank you for your help. I was able to build the model using the "prescribeMotionInModel.m" file.
Now I want to move the model to the desired coordinates. I mean when the model starts to move and lastly stops I want it to stop at the coordinates which I give to the model. What should I do ?
thanks,
Hamed
Re: .mot
Posted: Wed Oct 07, 2020 4:03 am
by hamed1994
hamed1994 wrote: ↑Mon Oct 05, 2020 5:41 am
tkuchida wrote: ↑Tue Sep 22, 2020 12:44 am
I mean reading the motion file. how can I do it?
Please see the "prescribeMotionInModel.m" example in your Resources\Code\Matlab directory. This file is mentioned on the "Scripting with Matlab" page in the documentation, which may also be helpful if you haven't seen it yet:
https://simtk-confluence.stanford.edu/d ... ith+Matlab.
hello
thank you for your help. I was able to build the model using the "prescribeMotionInModel.m" file.
Now I want to move the model to the desired coordinates. I mean when the model starts to move and lastly stops I want it to stop at the coordinates which I give to the model. What should I do ?
thanks,
Hamed
hello,
could you please answer this Mr. Uchida?
thanks,
Hamed