Page 1 of 1

matlab opensim: position of body during motion

Posted: Thu Jun 07, 2018 3:35 am
by ostr1969
how can i plot the x,y,z position of a body during motion (in matlab and in the gui)?
how can i attach a motion file to the model in matlab?

Re: matlab opensim: position of body during motion

Posted: Mon Jun 11, 2018 2:23 am
by mitkof6
1.

In the GUI you can use the plot tool.

https://simtk-confluence.stanford.edu/d ... m/Plotting

You can do this programmatically,

Code: Select all

mode.getSimbodyEngine().getPosition(...)
provided that the state is updated (pose)

https://simtk.org/api_docs/opensim/api_ ... cf11235179

2.

You don't attach a motion to a model. You update the state of the model e.g.

Code: Select all

state.updQ() = q
where q is a vector of coordinate values. It is best that you should familiarize yourself with the API first:

https://simtk-confluence.stanford.edu/d ... +Tutorials

Re: matlab opensim: position of body during motion

Posted: Tue Jun 19, 2018 5:03 am
by ostr1969
thanks for the answers
But ploting position is not shown in the ploting options, just moments, and forces and so on.

can you direct me for the right option?