[38ba34]: / Body / AAUHuman / LegTLEM2.1 / Interface.any

Download this file

179 lines (155 with data), 5.1 kB

//This file contains the interface to the leg it consist of joints and 
//nodes which can be used for defining contact with the sorroundings

#if BM_FOOT_MODEL == _FOOT_MODEL_DEFAULT_

AnyKinMeasureLinComb AnklePlantarFlexion = {
  AnyKinRotational RotMeasure = {
    Type=RotAxesAngles;
    Axis1 = z; Axis2 = x; Axis3 = y; 
    AnyRefNode &ShankNode = ...Seg.Shank.AnkleJoint;
    AnyRefNode &FootNode  = ...Seg.Talus.AnkleJoint;
  };
  Coef = {{-1,0,0}};
  OutDim = 1;
};

AnyKinMeasureOrg SubTalarEversion={
  
  AnyFolder &Talus = ..Seg.Talus.SubTalarJoint;
  Talus ={
    AnyRefNode RotNode={
      ARel={{0,....Sign*-1,0},{....Sign*1,0,0},{0,0,1}};
    };
  };
  AnyFolder &Foot = ..Seg.Foot.SubTalarJoint;
  Foot ={
    AnyRefNode RotNode={
      ARel={{....Sign*1,0,0},{0,....Sign*1,0},{0,0,1}};
    };
  };
  AnyKinRotational Ankle = {
    Type=RotAxesAngles;
    AnyRefNode &TalusNode = ...Seg.Talus.SubTalarJoint;
    AnyRefNode &SubTalarNode  = ...Seg.Foot.SubTalarJoint;
   
  }; // End of SubTalar
  MeasureOrganizer={0};
};

#endif


AnyKinMeasureOrg KneeFlexion = {
  AnyFolder &Thigh = ..Seg.Thigh.KneeJoint;
  Thigh ={
    AnyRefNode RotNode={
      ARel={{....Sign*1,0,0},{0,....Sign*1,0},{0,0,1}};
    };
  };
  AnyFolder &Shank = ..Seg.Shank.KneeJoint;
  Shank ={
    AnyRefNode RotNode={
      ARel={{....Sign*1,0,0},{0,....Sign*1,0},{0,0,1}};
    };
  };
  AnyKinRotational KneeRot={
    AnyRefNode &ShankNode = ...Seg.Shank.KneeJoint.RotNode;
    AnyRefNode &ThighNode = ...Seg.Thigh.KneeJoint.RotNode;
    Type=RotAxesAngles;
  };
  MeasureOrganizer={0};
}; 


AnyKinMeasureOrg PatellaFlexion = {
  AnyFolder &Thigh = ..Seg.Thigh.PatellaFemurJoint;
  Thigh ={
    AnyRefNode RotNode={
      ARel={{....Sign*1,0,0},{0,....Sign*1,0},{0,0,1}};
    };
  };
  AnyFolder &Patella = ..Seg.Patella.PatellaFemurJoint;
  Patella ={
    AnyRefNode RotNode={
      ARel={{....Sign*1,0,0},{0,....Sign*1,0},{0,0,1}};
    };
  };
  AnyKinRotational PatellaMeasure={
    AnyRefNode &ThighNode = ...Seg.Thigh.PatellaFemurJoint.RotNode;
    AnyRefNode &PatellaNode = ...Seg.Patella.PatellaFemurJoint.RotNode;
    Type=RotAxesAngles;
  };
  MeasureOrganizer={0};
}; 

AnyKinMeasureOrg HipFlexion = {
  AnyFolder &HipJointRef=..Seg.Pelvis.HipJoint;
  HipJointRef={
    AnyRefNode RotNode={
      ARel= {{....Sign*-1,0,0},{0,....Sign*-1,0},{0,0,1}};
    };
  };
  AnyFolder &ThighNodeRef = ..Seg.Thigh.HipJoint;
  ThighNodeRef ={
    AnyRefNode RotNode={
      ARel={{....Sign*-1,0,0},{0,....Sign*-1,0},{0,0,1}};
    };
  };
  AnyKinRotational HipMeasure ={
    AnyRefNode &PelvisNode = ...Seg.Pelvis.HipJoint.RotNode;
    AnyRefNode &ThighNode = ...Seg.Thigh.HipJoint.RotNode;
    PelvisNode={AnyDrawRefFrame drw={RGB={1,0,0};Visible = Off;}; };
    ThighNode={AnyDrawRefFrame drw={RGB={0,1,0};Visible = Off;};  };
    Axis1 = z; Axis2 = x;  Axis3 = y;
    Type=RotAxesAngles;
  };
  MeasureOrganizer={0};
};
AnyKinMeasureOrg HipAbduction = {
  AnyKinRotational &HipJoint =.HipFlexion.HipMeasure; 
  MeasureOrganizer={1};
};
AnyKinMeasureOrg HipExternalRotation ={
  AnyKinRotational &HipJoint =.HipFlexion.HipMeasure; 
  MeasureOrganizer={2};
};

/// International society of Biomechancis (ISB) defines hip rotation relative to 
/// a ASIS-PSIS defined frame. The joint angles in this folder reflects those values
/// Note: these values are not 0 in the neutral position of the model since ASIS-PSIS are 
///       a different heights.
AnyFolder HipISB = {
  
  AnyKinMeasureOrg Flexion = {
    AnyFolder &HipJointRef=...Seg.Pelvis.HipJoint.ISB;
    HipJointRef={
        AnyRefNode RotNode={
          ARel= {{.....Sign*-1,0,0},{0,.....Sign*-1,0},{0,0,1}};
        };
    };
    AnyKinRotational HipMeasure ={
      AnyRefNode &PelvisNode = ....Seg.Pelvis.HipJoint.ISB.RotNode;
      AnyRefNode &ThighNode = ....Seg.Thigh.HipJoint.RotNode;
      Axis1 = z; Axis2 = x;  Axis3 = y;
      Type=RotAxesAngles;
    };
    MeasureOrganizer={0};
  };
  AnyKinMeasureOrg Abduction = {
    AnyKinRotational &HipJoint =.Flexion.HipMeasure; 
    MeasureOrganizer={1};
  };
  AnyKinMeasureOrg ExternalRotation ={
    AnyKinRotational &HipJoint =.Flexion.HipMeasure; 
    MeasureOrganizer={2};
  };

};


AnyKinMeasureOrg HipFlexionJntMus = {
  AnyKinRotational HipMeasure ={
    AnyRefNode &PelvisNode = ...Seg.Pelvis.HipJoint.RotNode;
    AnyRefNode &ThighNode = ...Seg.Thigh.HipJoint.RotNode;
    AngVelOnOff = On; // xyz vector output
    Type=RotAxesAngles;
  };
  MeasureOrganizer={2};
};
AnyKinMeasureOrg HipAbductionJntMus = {
  AnyKinRotational &HipJoint =.HipFlexionJntMus.HipMeasure; 
  MeasureOrganizer={0};
};
AnyKinMeasureOrg HipExternalRotationJntMus ={
  AnyKinRotational &HipJoint =.HipFlexionJntMus.HipMeasure; 
  MeasureOrganizer={1};
};




//AnyRefNode &HeelContactNode =.Seg.Foot.HeelNode;
//AnyRefNode &ToeMedialContactNode  =.Seg.Foot.ToeMedialContactNode;
//AnyRefNode &ToeLateralContactNode =.Seg.Foot.ToeLateralContactNode;
//