Page 1 of 1

about setActivation

Posted: Sat Aug 04, 2018 12:53 am
by lhr
Hello everybody,

i'm trying to set activation of tib_ant_r. My code looks like this:

Model anklemodel = Model("../model/Mysubject041.osim");
anklemodel.getMuscles().get(8).setActivation(s, tmp);

When I debug the code, I always get an error :The qualifier is discarded when a reference to a type "SimTK::State &" is bound to an initializer of type "const SimTK::State"

If anyone could give me a reason for the behavior i am seeing, that would be great.
Thanks!

Re: about setActivation

Posted: Sat Aug 04, 2018 7:13 pm
by tkuchida
Where is the State ('s') coming from? I think you're missing a line:

Code: Select all

Model anklemodel = Model("../model/Mysubject041.osim");
State& s = anklemodel.initSystem();
anklemodel.getMuscles().get(8).setActivation(s, tmp); //assuming 'tmp' has been declared