I'm trying to introduce fatigable muscles from the example provided into the Arm26 model. For that, I used the following:
Code: Select all
// Changing muscles from Thelen2003 to new FatigableMuscle
Object::renameType("Thelen2003Muscle", "FatigableMuscle");
// Arm26 instance
Model osimModel("arm26.osim");
The other issue I'm having is that, even with the original Thelen muscles, using the PrescribedController to manage the model's actuators is crashing. I was using the following with no avail:
Code: Select all
PrescribedController* muscleController = new PrescribedController();
muscleController->setActuators(osimModel.updActuators());
// Set the prescribed muscle controller to use the same muscle control function for each muscle
muscleController->prescribeControlForActuator("BRA", new Constant(0.5);
osimModel.addController(muscleController);
Best regards,
Maria C.