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?
matlab opensim: position of body during motion
- barak ostraich
- Posts: 42
- Joined: Thu Apr 12, 2018 12:17 am
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: matlab opensim: position of body during motion
1.
In the GUI you can use the plot tool.
https://simtk-confluence.stanford.edu/d ... m/Plotting
You can do this programmatically,
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.
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
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(...)
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
https://simtk-confluence.stanford.edu/d ... +Tutorials
- barak ostraich
- Posts: 42
- Joined: Thu Apr 12, 2018 12:17 am
Re: matlab opensim: position of body during motion
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?
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?