[770c98]: / Application / Examples / Squat / Model / TrunkDrivers.any

Download this file

106 lines (91 with data), 3.0 kB

AnyKinEqSimpleDriver NeckLateralBendingDriver = 
{
  AnyKinMeasure& ref0 = ...BodyModel.Interface.Trunk.SkullThoraxLateralBending;
  DriverPos = pi/180*{.JntPos.NeckLateralBending};
  DriverVel = pi/180*{.JntVel.NeckLateralBending};    
  Reaction.Type = {Off};
};

AnyKinEqSimpleDriver NeckRotationDriver = 
{
  AnyKinMeasure& ref0= ...BodyModel.Interface.Trunk.SkullThoraxRotation;
  DriverPos = pi/180*{.JntPos.NeckRotation};
  DriverVel = pi/180*{.JntVel.NeckRotation};    
  Reaction.Type = {Off};
};

//AnyKinEqSimpleDriver NeckJntDriver = 
//{
//  AnyKinMeasure& ref0 = ...BodyModel.Interface.Trunk.SkullThoraxFlexion;
//  DriverPos = pi/180*{.JntPos.NeckExtension};
//  DriverVel = pi/180*{.JntVel.NeckExtension};    
//  Reaction.Type = {Off};
//};

AnyKinEqSimpleDriver NeckExtensionDriver = 
{
  AnyKinRotational rot = 
  {
    AnyRefFrame& ref = ....BodyModel.Trunk.SegmentsCervicalSpine.SkullSeg.TopOfHead;
    Type = RotAxesAngles;
    Axis1 = z;
    Axis2 = y;
    Axis3 = x;
  };
  MeasureOrganizer = {0};
  DriverPos = pi/180*{-15};
  DriverVel = pi/180*{0.0};    
  Reaction.Type = {Off};
};

AnyKinEqSimpleDriver PelvisThoraxDriver =
{
//  AnyKinMeasure& ref0 = ...BodyModel.Interface.Trunk.PelvisThoraxExtension;
  AnyKinMeasure& ref1 = ...BodyModel.Interface.Trunk.PelvisThoraxLateralBending;        
  AnyKinMeasure& ref2 = ...BodyModel.Interface.Trunk.PelvisThoraxRotation;   
  
  DriverPos = pi/180*
  {
//    .JntPos.PelvisThoraxExtension,
    .JntPos.PelvisThoraxLateralBending,
    .JntPos.PelvisThoraxRotation
  };
  DriverVel = pi/180*
  {
//    .JntVel.PelvisThoraxExtension,
    .JntVel.PelvisThoraxLateralBending,
    .JntVel.PelvisThoraxRotation
  };
  Reaction.Type = repmat(nDim, Off);
};  

// This adds a 1/2 gearing between the hip flexion and the 
AnyKinEq HipBackFlexionRhythm = {
  AnyKinMeasureLinComb Combined = {
    AnyKinMeasure &ref1 = ....BodyModel.Interface.Trunk.PelvisThoraxExtension;
    AnyKinMeasure &ref2 = ....BodyModel.Interface.Right.HipFlexion;
    OutDim = 1;
    Coef = {{1, 0.4} };  
  }; 
};




AnyKinEqSimpleDriver PelvisRotXDriver= 
{
  AnyKinMeasure& ref = ...BodyModel.Interface.Trunk.PelvisRotX;
  DriverPos = pi/180 * {.JntPos.PelvisRotX};
  DriverVel = pi/180 * {.JntVel.PelvisRotX};
  Reaction.Type = {Off};
};   

AnyKinEqSimpleDriver PelvisRotYDriver= 
{
  AnyKinMeasure& ref = ...BodyModel.Interface.Trunk.PelvisRotY;
  DriverPos = pi/180 * {.JntPos.PelvisRotY};
  DriverVel = pi/180 * {.JntVel.PelvisRotY};
  Reaction.Type = {Off};
};  

AnyKinEqSimpleDriver TrunkAnteriorPosteriorDriver =
{
  AnyKinLinear lin = 
  {
    AnyRefFrame& ref1 = ....BodyModel.Right.Leg.Seg.Foot.BigToeNode ;
    AnyRefFrame& ref0 = ....BodyModel.Trunk.SegmentsThorax.ThoraxSeg.ij ;
    Ref = -1;
  };
  MeasureOrganizer = {0};
  DriverPos = {0};
  DriverVel = {0};
  Reaction.Type = {Off};
};