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
Is there any function to get Muscle Activation or stress ?
- Nithin Kurup
- Posts: 149
- Joined: Sat Jan 18, 2014 5:13 am
Is there any function to get Muscle Activation or stress ?
Last edited by Nithin Kurup on Mon Dec 01, 2014 8:04 am, edited 1 time in total.
Re: Is there any function to get Muscle Activation or stress
I am not sure (let someone confirm that, please) but I think that what you need is Static Optimization.
- Nithin Kurup
- Posts: 149
- Joined: Sat Jan 18, 2014 5:13 am
Re: Is there any function to get Muscle Activation or stress
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
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
I work on the same thing right now and I haven't found it yet 

- Nithin Kurup
- Posts: 149
- Joined: Sat Jan 18, 2014 5:13 am
Re: Is there any function to get Muscle Activation or stress
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
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
Have you tried:
given a state from your simulation?
Code: Select all
muscle.getActivation(state);
Re: Is there any function to get Muscle Activation or stress
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
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\AnalysesDid 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.
Re: Is there any function to get Muscle Activation or stress
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