I want to add a torque to a joint actuator meanwhile static optimization is done. To do this, I have used this code in the optimization loop:
Code: Select all
H_controller = osim.PrescribedController()
actuatorSet = model.getActuators()
H_controller.addActuator(actuatorSet.get('hip_motor_r'))
T_hipr = osim.Constant(0)
H_controller.prescribeControlForActuator('hip_motor_r', T_hipr)
model.addController(Hexa_controller)
Code: Select all
coord = coords.get(coordinate_names[j])
coord.setValue(state, coordinates[k, j])
coord.setSpeedValue(state, speeds[k, j])
Code: Select all
RuntimeError: std::exception in 'void OpenSim::Coordinate::setValue(SimTK::State &,double,bool) const': Component::getModelingOption: ERR- name 'is_clamped' not found.
for component 'hip_flexion_r' of type Coordinate
Best