How to work with actuators in acceleration matching static optimization
Posted: Thu Dec 21, 2023 7:25 am
Hi, I'm trying to implement acceleration matching static optimization, but I don't know the correct way of getting accelerations.
To get correct accelerations, I think residual actuators are needed. At this stage, I'm ignoring reserve actuators. I have added strong CoordinateActuators to coordinates without muscles, e.g. pelvis and lumbar coordinates, with optimal force, min and max control values of 500, -1, and +1, respectively. Then, I updated coordinates values setValue and speeds setSpeedValue. In the equality constraint, muscles activations setActivation were updated and model equilibrateMuscles was called first. Here are 3 methods I found to control the actuators:
1. updating actuators activation setOverrideActuation.
2. updating model's control setControls.
3. adding a PrescribedController for every actuator and updating their Constants values setValue.
And finally, calling model.realizeAcceleration() followed by state.getUDot(). Method 2 seems to be working. Which method is correct?
Any help/guidance/tip is greatly appreciated.
-Mohammadreza
To get correct accelerations, I think residual actuators are needed. At this stage, I'm ignoring reserve actuators. I have added strong CoordinateActuators to coordinates without muscles, e.g. pelvis and lumbar coordinates, with optimal force, min and max control values of 500, -1, and +1, respectively. Then, I updated coordinates values setValue and speeds setSpeedValue. In the equality constraint, muscles activations setActivation were updated and model equilibrateMuscles was called first. Here are 3 methods I found to control the actuators:
1. updating actuators activation setOverrideActuation.
2. updating model's control setControls.
3. adding a PrescribedController for every actuator and updating their Constants values setValue.
And finally, calling model.realizeAcceleration() followed by state.getUDot(). Method 2 seems to be working. Which method is correct?
Any help/guidance/tip is greatly appreciated.
-Mohammadreza