Page 1 of 1

Is there any function to get Muscle Activation or stress ?

Posted: Mon Dec 01, 2014 4:10 am
by ex10192
Hi,

I am trying to get the muscle activations, after a forward dynamic simulation for Optimisation purpose .But unfortunately, I am not sure which code to use for this.
https://simtk.org/forums/viewtopic.php?f=91&t=5305
Looking forward to any help.

Nithin

Re: Is there any function to get Muscle Activation or stress

Posted: Mon Dec 01, 2014 7:01 am
by mariakrgrg
I am not sure (let someone confirm that, please) but I think that what you need is Static Optimization.

Re: Is there any function to get Muscle Activation or stress

Posted: Mon Dec 01, 2014 7:41 am
by ex10192
Dear Maria,

Thanks a lot for your reply. Yes, static optimisation has parts which deal with muscle activation. I am trying to implement, the objective function similar to the one used in static optimisation, but I exactly dont know how the call or get muscle activation (coding wise) after my forward simulation ends, so that I can put the muscle activation in a loop and minimise it.

thanks again,

nithin

Re: Is there any function to get Muscle Activation or stress

Posted: Mon Dec 01, 2014 11:58 am
by mariakrgrg
I work on the same thing right now and I haven't found it yet :roll:

Re: Is there any function to get Muscle Activation or stress

Posted: Mon Dec 01, 2014 4:44 pm
by ex10192
Hi maria,

Yeah, it seems no one is replying. But have you tried getting activation from stress. as I found this function in the static optimisation code called getStress(), in documentation it states it gives the stress value and from this we can find the corresponding activation. This is only my guess.

Did you include staticoptimsation header and etc, before running your forward dynamics? as I was not able to find the optimisation headers in the main external files directory.

regards,

nithin

Re: Is there any function to get Muscle Activation or stress

Posted: Mon Dec 01, 2014 5:26 pm
by aseth
Have you tried:

Code: Select all

muscle.getActivation(state);
given a state from your simulation?

Re: Is there any function to get Muscle Activation or stress

Posted: Mon Dec 01, 2014 5:30 pm
by mariakrgrg
Also check my thread here, I have a piece of code that seems to kind of work.

Re: Is there any function to get Muscle Activation or stress

Posted: Tue Dec 02, 2014 6:04 am
by mariakrgrg
Did you include staticoptimsation header and etc, before running your forward dynamics? as I was not able to find the optimisation headers in the main external files directory.
Static Optimization headers are in the osimAnalyses project (if you have compiled OpenSim) or in the following path from the installed directory: C:\...\OpenSim 3.2\sdk\include\OpenSim\Analyses

Re: Is there any function to get Muscle Activation or stress

Posted: Fri Jul 10, 2015 10:54 am
by ajaykhan
yes, there must be a function to get muscle activation that you have to search well recently i found get muscle function that works well in the field of muscle. and i also get all advice from there that is very helpful for me and you can get any other solution beside muscle activation, thanks