matlab opensim: position of body during motion

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
barak ostraich
Posts: 42
Joined: Thu Apr 12, 2018 12:17 am

matlab opensim: position of body during motion

Post by barak ostraich » Thu Jun 07, 2018 3:35 am

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?

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: matlab opensim: position of body during motion

Post by Dimitar Stanev » Mon Jun 11, 2018 2:23 am

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

User avatar
barak ostraich
Posts: 42
Joined: Thu Apr 12, 2018 12:17 am

Re: matlab opensim: position of body during motion

Post by barak ostraich » Tue Jun 19, 2018 5:03 am

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?

POST REPLY