Create Model
- Tom Lintern
- Posts: 61
- Joined: Mon Dec 13, 2010 5:43 pm
Create Model
Hi,
I would like to construct a model myself to simulate the dynamics of a simple experimental set up. In this case it is an inverted pendulum with a moving support.
How could I do this? What software do you reccomend I use to make the model and define joint dof etc and also what is best way to do the dynamical analysis?
I would like to construct a model myself to simulate the dynamics of a simple experimental set up. In this case it is an inverted pendulum with a moving support.
How could I do this? What software do you reccomend I use to make the model and define joint dof etc and also what is best way to do the dynamical analysis?
- fady alnajjar
- Posts: 10
- Joined: Wed Mar 02, 2011 2:19 am
RE: Create Model
Although I just started using Opensim, I believe that the easy way is just to download a ready model and modify the *.osim file. I have tried this and it works.
I am sorry that I cannot answer your 2nd question.
I am sorry that I cannot answer your 2nd question.
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Create Model
Hi Tom,
As Fady suggested the easiest way to create a model with minimum XML editing would be to find a close enough model and make edits, alternatively you can check the User guide chapter on the file format.
You might find it easier to write a program using the OpenSim API that creates a model and saves it to a file (check the Developers' Guide if you take this route for an example).
Something to keep in mind is that the file format changes over time so if you end up copying and pasting parts of model files, these model files better have the same OpenSimDocument version number on top. If not, you can open these models and save them in the GUI and they'll be auto converted to the latest file format.
Hope this helps, and please let us know how it goes,
-Ayman
As Fady suggested the easiest way to create a model with minimum XML editing would be to find a close enough model and make edits, alternatively you can check the User guide chapter on the file format.
You might find it easier to write a program using the OpenSim API that creates a model and saves it to a file (check the Developers' Guide if you take this route for an example).
Something to keep in mind is that the file format changes over time so if you end up copying and pasting parts of model files, these model files better have the same OpenSimDocument version number on top. If not, you can open these models and save them in the GUI and they'll be auto converted to the latest file format.
Hope this helps, and please let us know how it goes,
-Ayman
- Tom Lintern
- Posts: 61
- Joined: Mon Dec 13, 2010 5:43 pm
RE: Create Model
Hi Ayman
Thanks for the tips.
I am trying to run the ExampleMain APIexample (sdk folder) in Visula Studio while working through the developers guide. I can compile the code and the executeable is created which works (or does nothing as expected).
However I can not run compile and run the code from visual studio. Is this normal? The error says
"Unable to start program... Cannot find the file ALL_BUILD"
Are you able to help me?
Cheers
Tom
Thanks for the tips.
I am trying to run the ExampleMain APIexample (sdk folder) in Visula Studio while working through the developers guide. I can compile the code and the executeable is created which works (or does nothing as expected).
However I can not run compile and run the code from visual studio. Is this normal? The error says
"Unable to start program... Cannot find the file ALL_BUILD"
Are you able to help me?
Cheers
Tom
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Create Model
Hi Tim,
In visual studio you can only run the executable created by the "current/start up project" as highlighted in bold. If you make the project that builds your executable as startup project (using the "Set as Startup Project" menu pick from the context menu, then you'll be able to run and debug.
Hope this helps,
-Ayman
In visual studio you can only run the executable created by the "current/start up project" as highlighted in bold. If you make the project that builds your executable as startup project (using the "Set as Startup Project" menu pick from the context menu, then you'll be able to run and debug.
Hope this helps,
-Ayman
- Tom Lintern
- Posts: 61
- Joined: Mon Dec 13, 2010 5:43 pm
RE: Create Model
Hi Ayman,
I was wondering if Visual Studio 2010 will still work with the API examples?
I am compiling the simple examples and the applications do not seem to run. An error box pops up asking for windows to try and check online for a solution etc.
I am running through the developers guide and embarrassingly enough, I can't even get past the initial example....
Any help would be much appreciated.
Tom
I was wondering if Visual Studio 2010 will still work with the API examples?
I am compiling the simple examples and the applications do not seem to run. An error box pops up asking for windows to try and check online for a solution etc.
I am running through the developers guide and embarrassingly enough, I can't even get past the initial example....
Any help would be much appreciated.
Tom
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Create Model
Tom,
The distribution has a prebuilt executable of the example using the same VisualStudio version (2005 Pro) called testOpenSimAPI, can you run that from the directory that contains the obj and vtp files?
You should also be able to get 2008 Express and use the VC9E distribution which has been tested (rather than 2010Express) using the link below
http://www.microsoft.com/express/Downlo ... -2008.aspx
Hope this helps and please let me know if you continue to have problems.
Best regards,
-Ayman
The distribution has a prebuilt executable of the example using the same VisualStudio version (2005 Pro) called testOpenSimAPI, can you run that from the directory that contains the obj and vtp files?
You should also be able to get 2008 Express and use the VC9E distribution which has been tested (rather than 2010Express) using the link below
http://www.microsoft.com/express/Downlo ... -2008.aspx
Hope this helps and please let me know if you continue to have problems.
Best regards,
-Ayman
- shayan moradkhani
- Posts: 41
- Joined: Fri May 05, 2017 5:12 pm
Re: Create Model
hi
hopefully i have found a simple pendulum model for my purpose. what i want to do is, i want to move the pendulum based on torque driven motion. how can i apply the torque on the joint between moving body and the ground body? do i have to first apply actuator and then torque?
do i need to have any experimental data to carry out my simulation on this basis?
is it enough to have only physical models+torques to simulate?
i also have a confusion: if i understood right, the muscles and actuators are two completely discrete sources of force/torque generation. is this statement correct? (where can i find related literature to understand this issue?)
another thing is: if they are different, what is the difference between the torque they produce?
or does the actuator receive it`s input signal from muscles?
im asking these because i am supposed to figure out how is it possible to control the movement of the a simple model such as a single pendulum with only torque-driven motion.
i appreciate your help
Shayan
hopefully i have found a simple pendulum model for my purpose. what i want to do is, i want to move the pendulum based on torque driven motion. how can i apply the torque on the joint between moving body and the ground body? do i have to first apply actuator and then torque?
do i need to have any experimental data to carry out my simulation on this basis?
is it enough to have only physical models+torques to simulate?
i also have a confusion: if i understood right, the muscles and actuators are two completely discrete sources of force/torque generation. is this statement correct? (where can i find related literature to understand this issue?)
another thing is: if they are different, what is the difference between the torque they produce?
or does the actuator receive it`s input signal from muscles?
im asking these because i am supposed to figure out how is it possible to control the movement of the a simple model such as a single pendulum with only torque-driven motion.
i appreciate your help
Shayan
- Thomas Uchida
- Posts: 1797
- Joined: Wed May 16, 2012 11:40 am
Re: Create Model
You can create a CoordinateActuator (https://simtk.org/api_docs/opensim/api_ ... uator.html) to apply torque at the joint, and use a Controller like PrescribedController (https://simtk.org/api_docs/opensim/api_ ... oller.html) to supply the control signal to the actuator. You can find an example that does something similar on the GitHub home page (https://github.com/opensim-org/opensim-core) (the example uses OpenSim 4.0, but the principle is the same).how can i apply the torque on the joint between moving body and the ground body?
- shayan moradkhani
- Posts: 41
- Joined: Fri May 05, 2017 5:12 pm
Re: Create Model
hi
thank you for your previous response, however, there seems to be a problem here.
i tried to download the visual studio c++ 2013 from "http://simtk-confluence.stanford.edu:80 ... sualStudio" but unfortunately it says this download is no longer available.
i want to run the c++ code for "simple example" on Github "https://github.com/opensim-org/opensim-core" and apparently i have to use visual studio 2013.
i also have a doubt: are the Doxygen in Opensim 4 different from Opensim 3.3. i get errors such as overloading a function, getGround is not a member of Opensim.model, addJoint is not a member of Opensim.model,....
i appreciate your help
Shayan
thank you for your previous response, however, there seems to be a problem here.
i tried to download the visual studio c++ 2013 from "http://simtk-confluence.stanford.edu:80 ... sualStudio" but unfortunately it says this download is no longer available.
i want to run the c++ code for "simple example" on Github "https://github.com/opensim-org/opensim-core" and apparently i have to use visual studio 2013.
i also have a doubt: are the Doxygen in Opensim 4 different from Opensim 3.3. i get errors such as overloading a function, getGround is not a member of Opensim.model, addJoint is not a member of Opensim.model,....
i appreciate your help
Shayan