Download this file

336 lines (255 with data), 10.0 kB


// This is to switch On or Off the MannequinDrivers. It is a quick way to drive any joint of the body 
// with pre-existing drivers. They are based on the FreePosture drivers, 
// so they are driving directly the joint angles and are really independent from each other. Also
// all DOF can be driven separatly.
// 0 switch the driver Off and 1 switch it On.
// The input value for each driver is the joint angles and velocities defined below in the Mannequin folder.
// Notice that even if it is possible to drive fully the model with those drivers, we originaly thinked them
// as alternative or debug drivers.
// *********************************************************************************************************

// Global switch:
// - if turned to 1 the drivers will be activated according to their individual statut.
// - if turned to 0 all drivers will desactivated (regardless to their individual statut).
#define GLOBAL_DRIVER_SWITCH 0

// Drivers for attaching the pelvis to the global reference system
#define PELVIS_POS_X_DRIVER 1
#define PELVIS_POS_Y_DRIVER 1
#define PELVIS_POS_Z_DRIVER 1

#define PELVIS_ROT_Z_DRIVER 1
#define PELVIS_ROT_Y_DRIVER 1
#define PELVIS_ROT_X_DRIVER 1


// Drivers for the spine
#define NECK_DRIVER 1

#define PELVIS_THORAX_LATERAL_BENDING_DRIVER 1
#define PELVIS_THORAX_ROTATION_DRIVER 1
#define PELVIS_THORAX_EXTENSION_DRIVER 1


// Drivers for the right arm
#define STERNO_CLAVICULAR_RIGHT_DRIVER 1

#define GLENOHUMERAL_ABDUCTION_RIGHT_DRIVER 1
#define GLENOHUMERAL_FLEXION_RIGHT_DRIVER 1
#define GLENOHUMERAL_EXTERNAL_ROTATION_RIGHT_DRIVER 1

#define ELBOW_FLEXION_RIGHT_DRIVER 1
#define ELBOW_PRONATION_RIGHT_DRIVER 1

#define WRIST_FLEXION_RIGHT_DRIVER 1
#define WRIST_ABDUCTION_RIGHT_DRIVER 1


// Drivers for the left arm
#define STERNO_CLAVICULAR_LEFT_DRIVER 1

#define GLENOHUMERAL_ABDUCTION_LEFT_DRIVER 1
#define GLENOHUMERAL_FLEXION_LEFT_DRIVER 1
#define GLENOHUMERAL_EXTERNAL_ROTATION_LEFT_DRIVER 1

#define ELBOW_FLEXION_LEFT_DRIVER 1
#define ELBOW_PRONATION_LEFT_DRIVER 1

#define WRIST_FLEXION_LEFT_DRIVER 1
#define WRIST_ABDUCTION_LEFT_DRIVER 1


// Drivers for the right leg
#define HIP_FLEXION_RIGHT_DRIVER 1
#define HIP_EXTERNAL_ROTATION_RIGHT_DRIVER 1
#define HIP_ABDUCTION_RIGHT_DRIVER 1

#define KNEE_FLEXION_RIGHT_DRIVER 1

#define ANKLE_FLEXION_RIGHT_DRIVER 1
#define ANKLE_EVERSION_RIGHT_DRIVER 0
#define ANKLE_SUBTALAR_EVERSION_RIGHT_DRIVER 1


// Drivers for the Left leg
#define HIP_FLEXION_LEFT_DRIVER 1
#define HIP_EXTERNAL_ROTATION_LEFT_DRIVER 1
#define HIP_ABDUCTION_LEFT_DRIVER 1

#define KNEE_FLEXION_LEFT_DRIVER 1

#define ANKLE_FLEXION_LEFT_DRIVER 1
#define ANKLE_EVERSION_LEFT_DRIVER 0
#define ANKLE_SUBTALAR_EVERSION_LEFT_DRIVER 1





// Those variable control the initial position of the body.
// They are also the input values for the MannequinDrivers if switched On above.
// ****************************************************************************


Main.HumanModel.Mannequin = {
  
  Posture = {
    //This controls the position of the pelvi wrt. to the global reference frame
    PelvisPosX=0.046;
    PelvisPosY=1.16;
    PelvisPosZ=0;
    
    //This controls the rotation of the pelvis wrt. to the global reference frame
    PelvisRotX=0;
    PelvisRotY=0;
    PelvisRotZ=0;
    
    // These variables control the rotation of the thorax wrt the
    // pelvis    
    PelvisThoraxExtension=0; 
    PelvisThoraxLateralBending=0;  
    PelvisThoraxRotation=0;        
    
    NeckExtension=0; 
    NeckLateralBending=0; 
    NeckRotation=0; 
    
    Right = {
      //Arm 
      SternoClavicularProtraction=-23;   //This value is not used for initial position
      SternoClavicularElevation=11.5;    //This value is not used for initial position
      
      GlenohumeralFlexion =-0; 
      GlenohumeralAbduction = 10; 
      GlenohumeralExternalRotation = 0; 
      
      ElbowFlexion = 0.01; 
      ElbowPronation = -20.0;
      
      WristFlexion =0;
      WristAbduction =0;
      
      //Hand
      Finger1 ={
        CMCDeviation=-20;
        CMCFlexion=20;
        MCPFlexion= 20;
        MCPDeviation=0;
        DIPFlexion=20;
      };
      
      Finger2 ={
        MCPFlexion=20;
        PIPFlexion=20;
        DIPFlexion=20;
      };
      
      Finger3 ={
        MCPFlexion=20;
        PIPFlexion=20;
        DIPFlexion=20;
      };
      
      Finger4 ={
        MCPFlexion=20;
        PIPFlexion=20;
        DIPFlexion=20;
      };
      
      Finger5 ={
        MCPFlexion=20;
        PIPFlexion=20;
        DIPFlexion=20;
      };
      
      //Leg
      HipFlexion = 0.0; 
      HipAbduction = 5.0; 
      HipExternalRotation = 0.0;
      
      KneeFlexion = 0.0; 
      
      AnklePlantarFlexion =0.0; 
      SubTalarEversion =0.0; 
    };
    
    Left = {
      //all values are set to be equal to the right side values 
      //feel free to change this!
      
      //Arm
      SternoClavicularProtraction=.Right.SternoClavicularProtraction;
      SternoClavicularElevation=.Right.SternoClavicularElevation;
      
      GlenohumeralFlexion = .Right.GlenohumeralFlexion ; 
      GlenohumeralAbduction =.Right.GlenohumeralAbduction ;
      GlenohumeralExternalRotation =.Right.GlenohumeralExternalRotation ;
      
      ElbowFlexion = .Right.ElbowFlexion; 
      ElbowPronation = .Right.ElbowPronation;       
      WristFlexion =.Right.WristFlexion;
      WristAbduction =.Right.WristAbduction;
      
      //Hand
      Finger1 ={
        CMCDeviation= ..Right.Finger1.CMCDeviation;
        CMCFlexion= ..Right.Finger1.CMCFlexion;
        MCPFlexion= ..Right.Finger1.MCPFlexion;
        MCPDeviation= ..Right.Finger1.MCPDeviation;
        DIPFlexion= ..Right.Finger1.DIPFlexion;
      };
      
      Finger2 ={
        MCPFlexion= ..Right.Finger2.MCPFlexion;
        PIPFlexion= ..Right.Finger2.PIPFlexion;
        DIPFlexion= ..Right.Finger2.DIPFlexion;
      };
      
      Finger3 ={
        MCPFlexion= ..Right.Finger3.MCPFlexion;
        PIPFlexion= ..Right.Finger3.PIPFlexion;
        DIPFlexion= ..Right.Finger3.DIPFlexion;
      };
      
      Finger4 ={
        MCPFlexion= ..Right.Finger4.MCPFlexion;
        PIPFlexion= ..Right.Finger4.PIPFlexion;
        DIPFlexion= ..Right.Finger4.DIPFlexion;
      };
      
      Finger5 ={
        MCPFlexion= ..Right.Finger5.MCPFlexion;
        PIPFlexion= ..Right.Finger5.PIPFlexion;
        DIPFlexion= ..Right.Finger5.DIPFlexion;
      };
      
      //Leg     
      HipFlexion =.Right.HipFlexion;  
      HipAbduction =.Right.HipAbduction;
      HipExternalRotation = .Right.HipExternalRotation;
      KneeFlexion = .Right.KneeFlexion;       
      AnklePlantarFlexion = .Right.AnklePlantarFlexion ;
      SubTalarEversion =.Right.SubTalarEversion; 
    };
  };
  
  PostureVel={  
    //This controls the position of the pelvi wrt. to the global reference frame
    PelvisPosX=0;
    PelvisPosY=0;
    PelvisPosZ=0;
    
    //This controls the rotation of the pelvis wrt. to the global reference frame
    PelvisRotX=0;
    PelvisRotY=0;
    PelvisRotZ=0;
    
    // These variables control the rotation of the thorax wrt the
    // pelvis    
    PelvisThoraxExtension=0; 
    PelvisThoraxLateralBending=0;  
    PelvisThoraxRotation=0;        
    
    NeckExtension=0; 
    NeckLateralBending=0; 
    NeckRotation=0; 
    
    Right = {
      //Arm 
      SternoClavicularProtraction=0;   //This value is not used for initial position
      SternoClavicularElevation=0;    //This value is not used for initial position
      
      GlenohumeralFlexion =0; 
      GlenohumeralAbduction = 0; 
      GlenohumeralExternalRotation = 0; 
      
      ElbowFlexion = 0.0;
      ElbowPronation = 0.0;
      
      WristFlexion =0;
      WristAbduction =0;
      
      //Leg
      HipFlexion = 7.0; 
      HipAbduction = 0.0; 
      HipExternalRotation = 0.0;
      
      KneeFlexion = 7.0; 
      
      AnklePlantarFlexion =0.0; 
      SubTalarEversion =0.0; 
    };
    
    Left = {
      //all values are set to be equal to the right side values 
      //feel free to change this!
      
      //Arm
      SternoClavicularProtraction=.Right.SternoClavicularProtraction;
      SternoClavicularElevation=.Right.SternoClavicularElevation;
      
      GlenohumeralFlexion = .Right.GlenohumeralFlexion ; 
      GlenohumeralAbduction =.Right.GlenohumeralAbduction ;
      GlenohumeralExternalRotation =.Right.GlenohumeralExternalRotation ;
      
      ElbowFlexion = .Right.ElbowFlexion; 
      ElbowPronation = .Right.ElbowPronation;       
      WristFlexion =.Right.WristFlexion;
      WristAbduction =.Right.WristAbduction;
      
      //Leg     
      HipFlexion =.Right.HipFlexion;  
      HipAbduction =.Right.HipAbduction;
      HipExternalRotation = .Right.HipExternalRotation;
      KneeFlexion = .Right.KneeFlexion;       
      AnklePlantarFlexion = .Right.AnklePlantarFlexion ;
      SubTalarEversion =.Right.SubTalarEversion; 
    };
  };
  
  AnyFolder Load = {
    AnyVec3 TopVertebra = {0.000, 0.000, 0.000};
    
    AnyFolder Right = {
      AnyVec3 Shoulder  = {0.000, 0.000, 0.000};
      AnyVec3 Elbow     = {0.000, 0.000, 0.000};
      AnyVec3 Hand      = {0.000, 0.000, 0.000};
      AnyVec3 Hip       = {0.000, 0.000, 0.000};
      AnyVec3 Knee      = {0.000, 0.000, 0.000};
      AnyVec3 Ankle     = {0.000, 0.000, 0.000};
    };
    AnyFolder Left = {
      AnyVec3 Shoulder  = {0.000, 0.000, 0.000};
      AnyVec3 Elbow     = {0.000, 0.000, 0.000};
      AnyVec3 Hand      = {0.000, 0.000, 0.000};
      AnyVec3 Hip       = {0.000, 0.000, 0.000};
      AnyVec3 Knee      = {0.000, 0.000, 0.000};
      AnyVec3 Ankle     = {0.000, 0.000, 0.000};
    };
  };  // Loads
};