I believe you are looking into BergmannGH shoulder model. You are right, the model is driven in a cyclic motion in the abduction plane. Above this driver in Model/JointAndDrivers.any you can find a piece of code, where all 3 rotations can be driven, but, to ensure the right number of free degrees of freedom, some are outcommented:
You can outcomment relevant lines and modify this code to work for flexion and external rotation as well. These 3 rotations are sufficient to drive shoulder, but if you want to add drivers for, say, plane of elevation and elevation - you would need to define relevant kinematics measures using AnyKinRotational and drive corresponding joint angles to the needed values by copying either code from the cyclic movement or the driver above.
I would recommend you to revisit Tutorials and learn how to define motion here
But, I already tried to modify those codes which make to move GH flexion as well.
Here are some codes i modified, please check these out.
1.
AnyKinEqSimpleDriver GHDriverRight={
// AnyKinMeasure& ref1 =...BodyModel.Interface.Right.GlenohumeralAbduction;
AnyKinMeasure& ref2 =...BodyModel.Interface.Right.GlenohumeralFlexion;
// AnyKinMeasure& ref3 =...BodyModel.Interface.Right.GlenohumeralExternalRotation;
// Settings for mannequin #define BM_MANNEQUIN_DRIVER_GLENOHUMERAL_ABDUCTION_RIGHT OFF #define BM_MANNEQUIN_DRIVER_GLENOHUMERAL_FLEXION_RIGHT ON #define BM_MANNEQUIN_DRIVER_GLENOHUMERAL_EXTERNAL_ROTATION_RIGHT OFF
// Changed the range of motion: 0~90 deg.
AnyVar startangle = 0;
AnyVar endangle = 90;
I got an error: Study.InitialConditions : Model is kinematically indeterminate
You problem is that you need to define all angles - flexion, abduction, and external rotation, but you only provide information on flexion and disable default drivers for abduction and external rotation.
#3 will not have an effect since these variables are not connected to the drivers. You should set starting angle and velocities in the Mannequin.any