Page 1 of 1
Create Model
Posted: Tue Mar 08, 2011 11:40 am
by tlin067
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?
RE: Create Model
Posted: Tue Mar 08, 2011 5:39 pm
by fadyalnajjar
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.
RE: Create Model
Posted: Wed Mar 09, 2011 2:58 am
by aymanh
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
RE: Create Model
Posted: Tue Mar 22, 2011 2:23 pm
by tlin067
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
RE: Create Model
Posted: Wed Mar 23, 2011 9:27 am
by aymanh
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
RE: Create Model
Posted: Mon Mar 28, 2011 4:42 pm
by tlin067
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
RE: Create Model
Posted: Tue Mar 29, 2011 11:39 am
by aymanh
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
Re: Create Model
Posted: Mon Jun 05, 2017 1:11 am
by student
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
Re: Create Model
Posted: Mon Jun 05, 2017 10:56 am
by tkuchida
how can i apply the torque on the joint between moving body and the ground body?
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).
Re: Create Model
Posted: Mon Jun 12, 2017 8:59 am
by student
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