--- a +++ b/Application/Examples/StandingModelScalingDisplay/Model/RightLegTDDrivers.any @@ -0,0 +1,122 @@ + + + // Place the right toe and heel on the ground + AnyKinEqSimpleDriver RToeGroundConstraint ={ + AnyKinLinear ToePos = { + AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef; + AnyRefNode &Ball = Main.Model.BodyModel.Right.Leg.Seg.Foot.ToeJoint; + }; + MeasureOrganizer = {1}; // Only the y coordinate + DriverPos = {0.0}; + DriverVel = {0}; + Reaction.Type = {Off}; // Provide ground reaction forces + + }; + + AnyKinEqSimpleDriver RHeelGroundConstraint ={ + AnyKinLinear HeelPos = { + AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef; + AnyRefNode &Ball = Main.Model.BodyModel.Right.Leg.Seg.Foot.HeelNode; + }; + MeasureOrganizer = {1}; // Only the y coordinate + DriverPos = {0.0}; + DriverVel = {0}; + Reaction.Type = {Off}; // Provide ground reaction forces + }; + + + // Position the Ankles right above the z axis + AnyKinEqSimpleDriver RAnkleX = { + AnyKinLinear AnklePos = { + AnyFixedRefFrame &Ground = Main.Model.Environment.GlobalRef; + AnyRefNode &Ankle = ..LegR.Seg.Foot.SubTalarJoint; + }; + MeasureOrganizer = {0}; // Only the x coordinate + DriverPos = {0.0}; + DriverVel = {0.0}; + Reaction.Type = {Off}; + }; + + + + // ************************************ + // Drivers for the right leg + // ************************************ + + //Hip driver + AnyKinEqSimpleDriver HipDriverRight={ + AnyKinMeasure& ref1 =...BodyModel.Interface.Right.HipFlexion; + AnyKinMeasure& ref2 =...BodyModel.Interface.Right.HipExternalRotation; + AnyKinMeasure& ref3 =...BodyModel.Interface.Right.HipAbduction; + DriverPos= pi/180*{ + .JntPos.Right.HipFlexion, + .JntPos.Right.HipExternalRotation, + .JntPos.Right.HipAbduction + }; + DriverVel = pi/180*{ + .JntVel.Right.HipFlexion, + .JntVel.Right.HipExternalRotation, + .JntVel.Right.HipAbduction + }; + Reaction.Type={Off,Off,Off}; + + }; + + //Knee driver + AnyKinEqSimpleDriver KneeDriverRight={ + AnyKinMeasure& Knee = ...BodyModel.Interface.Right.KneeFlexion; + DriverPos=pi/180*{.JntPos.Right.KneeFlexion}; + DriverVel = pi/180*{.JntVel.Right.KneeFlexion}; + Reaction.Type={Off}; + }; + + //Ankle driver + AnyKinEqSimpleDriver AnkleDriverRight={ + AnyKinMeasure& ref1=...BodyModel.Interface.Right.AnklePlantarFlexion; + AnyKinMeasure& ref2=...BodyModel.Interface.Right.SubTalarEversion; + DriverPos = pi/180*{.JntPos.Right.SubTalarEversion}; + DriverVel=pi/180*{.JntVel.Right.SubTalarEversion}; + Reaction.Type={Off}; + MeasureOrganizer={1}; + }; + + + + + AnyReacForce RightFootReaction = { + + + AnyKinRotational rot = { + AnySeg &ref1=..LegR.Seg.Foot; + AnyFixedRefFrame &ref2 = ....Environment.GlobalRef; + Type = RotVector; + }; + + AnyKinLinear RightFootLinMeasure = { + AnySeg &ref1=..LegR.Seg.Foot; + AnyFixedRefFrame &ref2 = ....Environment.GlobalRef; + }; + + }; + + + MannequinLoads.Right = { + + AnyForce3D Hip = { + AnyRefNode &ApplPoint = .rhm.Leg.Seg.Thigh.HipJoint; + F = .locmql.Hip; + }; + + AnyForce3D Knee = { + AnyRefNode &ApplPoint = .rhm.Leg.Seg.Thigh.KneeJoint; + F = .locmql.Knee; + }; + + AnyForce3D Ankle = { + AnyRefNode &ApplPoint = .rhm.Leg.Seg.Talus.AnkleJoint; + F = .locmql.Ankle; + }; + }; + + + \ No newline at end of file