Page 1 of 2

How to add motion to existing Muscles ?

Posted: Sun Sep 20, 2015 10:43 pm
by gautamr1858
How can I add motion for existing muscles ? For example I want to bend the biceps and relax the triceps from the existing model uploaded in the website ? How can I do that by using force ? How to create such force and input it on the muscles ? Or should I add angles in .sto file and tell muscles what to do ?

Re: How to add motion to existing Muscles ?

Posted: Mon Sep 21, 2015 5:10 pm
by tkuchida
If I understand correctly, you are trying to modify muscle paths. Please see the documentation on via points and muscle wrapping (e.g., http://simtk-confluence.stanford.edu:80 ... l+Modeling, Question 2).

Re: How to add motion to existing Muscles ?

Posted: Mon Sep 21, 2015 10:34 pm
by gautamr1858
I want to add motion to the this model. http://simtk-confluence.stanford.edu:80 ... mity+Model

I want to produce this motion of bending, flex and extend… like doing dumbbells. How can I do that ?

Re: How to add motion to existing Muscles ?

Posted: Tue Sep 22, 2015 1:09 am
by tkuchida
The model you have indicated was created in SIMM, so you will first need to import it into OpenSim (File -> Import SIMM Model…). You can then use the textboxes and sliders in the Coordinates window to pose the model. Depending on your application, you may also want to create a .sto file containing the desired motion.

An easy way to generate a .sto file with the correct column headers is to run a short Forward Dynamics simulation and edit the resulting states file. The model you have indicated has no inertial properties (please see the description here: http://simtk-confluence.stanford.edu:80 ... tal+Models), but you can still run a Forward Dynamics simulation by setting the "Time range to process" from 0 to 0.

Hope that helps.

Re: How to add motion to existing Muscles ?

Posted: Tue Sep 22, 2015 5:56 am
by gautamr1858
I was able to run the forward simulation tool box but I am unable to generate the .sto file.

Re: How to add motion to existing Muscles ?

Posted: Tue Sep 22, 2015 10:44 am
by tkuchida
Please see the User's Guide for help using the Forward Dynamics Tool (http://simtk-confluence.stanford.edu:80 ... amics+Tool). If you are still encountering issues, please provide detailed information about what you did and what happened.

Re: How to add motion to existing Muscles ?

Posted: Wed Sep 23, 2015 10:29 pm
by gautamr1858
ran the forward dynamics tool and I was unable to generate the .sto file. I have attached the screenshots.

Re: How to add motion to existing Muscles ?

Posted: Thu Sep 24, 2015 12:00 am
by tkuchida
Your screenshots indicate that you have attempted to run a 1-second dynamic simulation of this model. As I pointed out above, this particular model has no inertial properties (which are essential to run a dynamic simulation). However, you can still use the Forward Dynamics Tool to generate a .sto file by simulating from 0 to 0 seconds.

Re: How to add motion to existing Muscles ?

Posted: Thu Sep 24, 2015 12:39 am
by gautamr1858
Yeah got it I am able to perform dynamic simulation by uploading the .sto file (motion file) that I created. But the thing is I want it to do it by itself, generating its own .sto file but you said no inertial properties. I have attached .sto file that I created, when I load that file it performs the simulation. So can I interface Matlab to opensim for this model and activate it ?

Re: How to add motion to existing Muscles ?

Posted: Thu Sep 24, 2015 6:37 am
by jimmy
Hi-

The computed muscle control tutorial walks you through how to take a model and a motion and get out a set of muscle activations that generate that motion.

From your questions it seems you are actually interested in the muscle activations that generate motion. You can either start with a motion and then back calculate the activations using static optimization or computed muscle control, or you can use the excitation editor to generate a set of muscle excitations for a forward simulation and analyse the result.

Perhaps try and work through the all of the examples, they will give you a good foundation in how to use the OpenSim interface to generate muscle activations, forces and motion.

Goodluck,
-James