--- a +++ b/Application/Beta/UlmRatHindlimbModel/Model/JointsAndDrivers.any @@ -0,0 +1,550 @@ + + + //***************************************************************************************** + // ANY - KIN - MEASURES + //***************************************************************************************** + + AnyFolder Drivers = { + //****************************************************** + // Hip-Segment + //****************************************************** + AnyKinLinear LinMainTrans={ + Ref=0; + AnyFixedRefFrame &ref1= ...Ground; + AnyRefFrame &ref2=...Seg.SpinePelvis.Hip; + }; + AnyKinRotational RotMainRot={ + Type = RotAxesAngles; + Axis1 = y; + Axis2 = z; + Axis3 = x; + AnyFixedRefFrame &ref1 = ...Ground; + AnyRefFrame &ref2 = ...Seg.SpinePelvis.Hip; + //Ref=0; + }; + + //******************************************************* + // Measures between Spine/Pelvis and Femur + //******************************************************* + #if FRACTUREMODEL + AnyKinRotational LinHipRot = { + //Ref = 1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + AnyRefFrame &spine = ...Ground; + //AnyRefFrame &LabOrigin = ..Seg.SpinePelvis; + AnyRefFrame &P1 = ...Seg.Femur_p; + }; + + AnyKinRotational LinHipRot_anatomisch = { + //Ref = 1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + // AnyRefFrame &spine = ..Ground; + AnyRefFrame &LabOrigin = ...Seg.SpinePelvis; + AnyRefFrame &P1 = ...Seg.Femur_p; + }; + #else + AnyKinRotational LinHipRot = { + //Ref = 1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + AnyRefFrame &spine = ...Ground; + //AnyRefFrame &LabOrigin = ..Seg.SpinePelvis; + AnyRefFrame &P1 = ...Seg.Femur; + }; + + AnyKinRotational LinHipRot_anatomisch = { + //Ref = 1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + // AnyRefFrame &spine = ...Ground; + AnyRefFrame &LabOrigin = ...Seg.SpinePelvis; + AnyRefFrame &P1 = ...Seg.Femur; + }; + #endif + + + //******************************************************* + // Measures between Femur and Tibia + //******************************************************* + AnyKinRotational LinKneeRot = { + //Ref = -1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + AnyRefFrame &spine = ...Ground; + // AnyRefFrame &LabOrigin = ...Seg.Femur; + AnyRefFrame &P1 = ...Seg.Tibia; + }; + + #if FRACTUREMODEL + AnyKinRotational LinKneeRot_anatomisch = { + //Ref = -1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + // AnyRefFrame &spine = ...Ground; + AnyRefFrame &LabOrigin = ...Seg.Femur_d; + AnyRefFrame &P1 = ...Seg.Tibia; + }; + #else + AnyKinRotational LinKneeRot_anatomisch = { + //Ref = -1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + // AnyRefFrame &spine = ..Ground; + AnyRefFrame &LabOrigin = ...Seg.Femur; + AnyRefFrame &P1 = ...Seg.Tibia; + }; + #endif + //******************************************************* + // Measures between Tibia and Metatarsus + //******************************************************* + AnyKinRotational LinAnkleRot = { + //Ref = -1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + AnyRefFrame &spine = ...Ground; + // AnyRefFrame &LabOrigin = ...Seg.Tibia; + AnyRefFrame &P1 = ...Seg.Metatarsus; + }; + + AnyKinRotational LinAnkleRot_anatomisch = { + //Ref = -1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + // AnyRefFrame &spine = ...Ground; + AnyRefFrame &LabOrigin = ...Seg.Tibia; + AnyRefFrame &P1 = ...Seg.Metatarsus; + }; + + //******************************************************* + // Measures between Metatarsus and Phalanges + //******************************************************* + AnyKinRotational LinPhalRot = { + //Ref = -1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + AnyRefFrame &spine = ...Ground; + //AnyRefFrame &LabOrigin = ...Seg.Metatarsus; + AnyRefFrame &P1 = ...Seg.Phalanges; + }; + + AnyKinRotational LinPhalRot_anatomisch = { + //Ref = -1; + Axis1 = y; + Axis2 = z; + Axis3 = x; + Type = RotAxesAngles; + // AnyRefFrame &spine = ...Ground; + AnyRefFrame &LabOrigin = ...Seg.Metatarsus; + AnyRefFrame &P1 = ...Seg.Phalanges; + }; + + //******************************************************* + // Measures between Femur and Patella + //******************************************************* + AnyKinRotational LinPatRot = { + //Ref = -1; + Type = RotAxesAngles; + Axis1 = y; + Axis2 = z; + Axis3 = x; + AnyRefFrame &spine = ...Ground; + // AnyRefFrame &LabOrigin = ...Seg.Femur; + AnyRefFrame &P1 = ...Seg.Patella; + }; + #if FRACTUREMODEL + AnyKinRotational LinPatRot_anatomisch = { + //Ref = -1; + Type = RotAxesAngles; + Axis1 = y; + Axis2 = z; + Axis3 = x; + // AnyRefFrame &spine = ...Ground; + AnyRefFrame &LabOrigin = ...Seg.Femur_d; + AnyRefFrame &P1 = ...Seg.Patella; + }; + #else + AnyKinRotational LinPatRot_anatomisch = { + //Ref = -1; + Type = RotAxesAngles; + Axis1 = y; + Axis2 = z; + Axis3 = x; + // AnyRefFrame &spine = ...Ground; + AnyRefFrame &LabOrigin = ...Seg.Femur; + AnyRefFrame &P1 = ...Seg.Patella; + }; + #endif + + //******************************************************* + // GRF Segment Measures + //******************************************************* + AnyKinLinear LinGroundMTrans = { + Ref = 1; + // AnyRefFrame &ref1= ...Ground; + AnyRefFrame &ref1= ...Seg.Metatarsus; + AnyRefFrame &ref2 = ...GroundSegmentM; + }; + + + AnyKinRotational RotGroundMRot={ + //Ref = 1; + // AnyRefFrame &ref1= ...Ground; + AnyRefFrame &ref1= ...Seg.Metatarsus; + AnyRefFrame &ref2 = ...GroundSegmentM; + Type = RotVector; + }; + + AnyKinLinear LinGroundPTrans = { + Ref = 1; + // AnyRefFrame &ref1= ...Ground; + AnyRefFrame &ref1= ...Seg.Phalanges; + AnyRefFrame &ref2 = ...GroundSegmentP; + }; + + + AnyKinRotational RotGroundPRot={ + //Ref = 1; + // AnyRefFrame &ref1= ...Ground; + AnyRefFrame &ref1= ...Seg.Phalanges; + AnyRefFrame &ref2= ...GroundSegmentP; + Type=RotVector; + }; + + + //*************************************************************************** + // DRIVERS + //*************************************************************************** + + //******************************************* + // Spine/Pelvis Driver + //******************************************* + AnyKinEqInterPolDriver DriverMainTrans = { + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\Main_trans.txt"; + AnyKinMeasure& ref = .LinMainTrans; //reference to the measure being driven + Reaction.Type={On, On, On}; + MeasureOrganizer = {0, 1, 2}; + }; + AnyKinEqInterPolDriver DriverMainRot = { + // Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\Main_rot.txt"; + AnyKinMeasure& ref = .RotMainRot; + Reaction.Type={On, On, On}; + MeasureOrganizer = {2, 0, 1}; + }; + + //******************************************* + // Hip Driver + //******************************************* + + AnyKinEqInterPolDriver DriverHipRotX = { + //AnyRevoluteJoint &Jnt = ...Jnts.Hip; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\hip_rot_x.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinHipRot; + AnySphericalJoint &Lin = ...Jnts.Hip; + MeasureOrganizer = {2}; + Reaction.Type = {Off}; + }; + AnyKinEqInterPolDriver DriverHipRotY = { + //AnyRevoluteJoint &Jnt = ...Jnts.Hip; + // Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + // Type = Bezier; + FileName = "..\Input\Drivers\hip_rot_y.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinHipRot; + AnySphericalJoint &Lin = ...Jnts.Hip; + MeasureOrganizer = {0}; + Reaction.Type = {Off}; + }; + + AnyKinEqInterPolDriver DriverHipRotZ = { + //AnyRevoluteJoint &Jnt = ...Jnts.Hip; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\hip_rot_z.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinHipRot; + AnySphericalJoint &Lin = ...Jnts.Hip; + MeasureOrganizer = {1}; + Reaction.Type = {Off}; + }; + + + + + //***************************************************** + // Knee Driver + //***************************************************** + AnyKinEqInterPolDriver DriverKneeRotX = { + //AnyRevoluteJoint &Jnt = ...Jnts.Knee; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\knee_rot_x.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinKneeRot; + AnySphericalJoint &Lin = ...Jnts.Knee; + MeasureOrganizer = {2}; + Reaction.Type = {On}; + }; + AnyKinEqInterPolDriver DriverKneeRotY = { + //AnyRevoluteJoint &Jnt = ...Jnts.Knee; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\knee_rot_y.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinKneeRot; + AnySphericalJoint &Lin = ...Jnts.Knee; + MeasureOrganizer = {0}; + Reaction.Type = {Off}; + }; + AnyKinEqInterPolDriver DriverKneeRotZ = { + //AnyRevoluteJoint &Jnt = ...Jnts.Knee; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\knee_rot_z.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinKneeRot; + AnySphericalJoint &Lin = ...Jnts.Knee; + MeasureOrganizer = {1}; + Reaction.Type = {On}; + }; + + //******************************************************* + // Ankle Driver + //******************************************************* + AnyKinEqInterPolDriver DriverAnkleRotX = { + //AnyRevoluteJoint &Jnt = ...Jnts.Ankle; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\ankle_rot_X.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinAnkleRot; + AnySphericalJoint &Lin = ...Jnts.Ankle; + MeasureOrganizer = {2}; + Reaction.Type = {On}; + }; + + AnyKinEqInterPolDriver DriverAnkleRotY = { + //AnyRevoluteJoint &Jnt = ...Jnts.Ankle; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\ankle_rot_Y.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinAnkleRot; + AnySphericalJoint &Lin = ...Jnts.Ankle; + MeasureOrganizer = {0}; + Reaction.Type = {Off}; + }; + + AnyKinEqInterPolDriver DriverAnkleRotZ = { + //AnyRevoluteJoint &Jnt = ...Jnts.Ankle; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\ankle_rot_Z.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinAnkleRot; + AnySphericalJoint &Lin = ...Jnts.Ankle; + MeasureOrganizer = {1}; + Reaction.Type = {On}; + }; + + //******************************************************* + // Phalanx Driver + //******************************************************* + AnyKinEqInterPolDriver DriverPhalRotX = { + //AnyRevoluteJoint &Jnt = ...Jnts.Phal; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\phal_rot_x.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinPhalRot; + AnySphericalJoint &Lin = ...Jnts.Phal; + MeasureOrganizer = {2}; + Reaction.Type = {On}; + }; + + AnyKinEqInterPolDriver DriverPhalRotY = { + //AnyRevoluteJoint &Jnt = ...Jnts.Phal; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\phal_rot_Y.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinPhalRot; + AnySphericalJoint &Lin = ...Jnts.Phal; + MeasureOrganizer = {0}; + Reaction.Type = {Off}; + }; + + AnyKinEqInterPolDriver DriverPhalRotZ = { + //AnyRevoluteJoint &Jnt = ...Jnts.Phal; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\phal_rot_Z.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinPhalRot; + AnySphericalJoint &Lin = ...Jnts.Phal; + MeasureOrganizer = {1}; + Reaction.Type = {On}; + }; + + //******************************************************* + // Patello Femoral Joint Driver + //******************************************************* + // AnyKinEqInterPolDriver DriverPatRot = { + // //AnyRevoluteJoint &Jnt = ...Jnts.Pat; + // //Type = PiecewiseLinear; + // Type = Bspline; + // BsplineOrder = 4; + // FileName = "drivers\pat_rot.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinPatRot; + // MeasureOrganizer = {0}; + // Reaction.Type = {On}; + // }; + + + AnyKinEqInterPolDriver DriverPatRotX = { + //AnyRevoluteJoint &Jnt = ...Jnts.Phal; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\pat_rot_x.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinPatRot; + AnySphericalJoint &Lin = ...Jnts.Pat; + MeasureOrganizer = {2}; + Reaction.Type = {On}; + }; + + AnyKinEqInterPolDriver DriverPatRotY = { + //AnyRevoluteJoint &Jnt = ...Jnts.Phal; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\pat_rot_Y.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinPatRot; + AnySphericalJoint &Lin = ...Jnts.Pat; + MeasureOrganizer = {0}; + Reaction.Type = {On}; + }; + + AnyKinEqInterPolDriver DriverPatRotZ = { + //AnyRevoluteJoint &Jnt = ...Jnts.Phal; + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + FileName = "..\Input\Drivers\pat_rot_Z.txt"; + // AnyKinMeasure& Lin = ...Drivers.LinPatRot; + AnySphericalJoint &Lin = ...Jnts.Pat; + MeasureOrganizer = {1}; + Reaction.Type = {On}; + }; + + + + + + + //******************************************************* + // Ground Segment Drivers + //******************************************************* + // The center of pressure has been moved sligthly sideways to obtain realistic + // abduction/adduction moment of the Ankle + AnyKinEqInterPolDriver DriverGroundMTrans = { + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + MeasureOrganizer = {0, 1, 2}; + FileName = "..\Input\Drivers\GroundDriver_trans_M.txt"; + AnyKinMeasure& ref = .LinGroundMTrans; + Reaction.Type={Off, Off, Off}; + }; + + AnyKinEqSimpleDriver DriverGroundMRot = { + AnyKinRotational &ref1= .RotGroundMRot; + DriverPos={0,0,0}; + DriverVel={0,0,0}; + Reaction.Type={Off,Off,Off}; + MeasureOrganizer = {0, 1, 2}; + }; + AnyKinEqInterPolDriver DriverGroundPTrans = { + //Type = PiecewiseLinear; + Type = Bspline; + BsplineOrder = 4; + MeasureOrganizer = {0, 1, 2}; + FileName = "..\Input\Drivers\GroundDriver_trans_P.txt"; + AnyKinMeasure& ref = .LinGroundPTrans; + Reaction.Type={Off, Off, Off}; + }; + + AnyKinEqSimpleDriver DriverGrounPRot = { + AnyKinRotational &ref1= .RotGroundPRot; + DriverPos={0,0,0}; + DriverVel={0,0,0}; + Reaction.Type={Off,Off,Off}; + MeasureOrganizer = {0,1,2}; + }; + + AnyReacForce GroundFootContactForceM = { + + AnyKinLinear Lin={ + // very very important this ensure that the reaction is between artifical segment and the foot + // and not between foot and globalref if Ref had been equal -1 which is default + Ref=0; + AnySeg &ref1= ....GroundSegmentM; + AnySeg &ref2 = ....Seg.Metatarsus; + // AnySeg &ref2=...Seg.Tibia; + }; + + AnyKinRotational Rot= { + AnySeg &ref1 = .Lin.ref1; + AnySeg &ref2 = .Lin.ref2; + //AnySeg &ref2 = ...Seg.Tibia; + Type=RotVector; + }; + }; + + AnyReacForce GroundFootContactForceP={ + + AnyKinLinear Lin={ + // very very important this ensure that the reaction is between artifical segment and the foot + // and not between foot and globalref if Ref had been equal -1 which is default + Ref=0; + AnySeg &ref1= ....GroundSegmentP; + AnySeg &ref2= ....Seg.Phalanges; + }; + AnyKinRotational Rot= { + AnySeg &ref1 = .Lin.ref1; + AnySeg &ref2 = .Lin.ref2; + Type=RotVector; + }; + }; + }; // AnyFolder Drivers \ No newline at end of file