I use clutchedPathSpring and its stretch state has limits to bound in between.
The stretch must be starting from the formula of initial length and initial angle, which is also a state.
apparently, now i can fix the initial value for the stretch or, if not, it starts from a value which satisfies the goals.
so i need something like:
problem.setStateInfo(
"/jointset/knee_r/knee_angle_r/value", {-120 * Pi / 180, 10*Pi/180});
problem.setStateInfo("/forceset/clutch_spring_r/stretch", {0,0.13}, F(initKneeAngle) );
where F(initKneeAngle), is not free, it has a constrain to the initial angle.
is there an option to do this?
i know the c++ OpenSim Objects and can modify any if needed.
adding moco initial state info that depends on other state
- barak ostraich
- Posts: 42
- Joined: Thu Apr 12, 2018 12:17 am
- Nicholas Bianco
- Posts: 1041
- Joined: Thu Oct 04, 2012 8:09 pm
Re: adding moco initial state info that depends on other state
Hi Barak,
No, that is not possible, and currently the setStateInfo interface isn't set up to support such an addition.
It might be easier to achieve this with MocoInitialOutputGoal, but I'm not sure.
-Nick
No, that is not possible, and currently the setStateInfo interface isn't set up to support such an addition.
It might be easier to achieve this with MocoInitialOutputGoal, but I'm not sure.
-Nick