/* ---------------------------------------------------------------- Drivers for a standing model: - The two feet are constrained forward/backward and vertically (x & y) - The pelvis is constrained laterally (z) - The CoM is constrained forward/backward and laterally above the origin. The remaining degrees of freedom (with the exception of a few shoulder movements) are controlled by parameters in the mannequin.any file. The forces defined in the mannequin.any file are attached to the body locations at the bottom of this file. John Rasmussen, March 5, 2004. ---------------------------------------------------------------- */ AnyFolder Joints = { AnyStdJoint SeatPelvis = { AnyRefFrame& Seat = Main.Model.EnvironmentModel.GlobalRef.Hpoint; AnyRefFrame& Pelvis = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg; }; }; AnyFolder Drivers = { // Aliases for convenient referencing AnyFolder &JntPos=..Mannequin.Posture; AnyFolder &JntVel=..Mannequin.PostureVel; AnyFolder &Thorax = ..BodyModel.Trunk.SegmentsThorax.ThoraxSeg; AnyFolder &LegR = ..BodyModel.Right.Leg; AnyFolder &LegL = ..BodyModel.Left.Leg; // //Constraint the collective CoM to be right above the GlobalRef // AnyKinEqSimpleDriver CoMDriver = { // AnyKinCoM CoM = { // AnyFolder &Body = Main.Model.BodyModel; // }; // MeasureOrganizer = {0,2}; // Only the x and z directions // DriverPos = {0,0}; // DriverVel = {0,0}; // Reaction.Type = {Off,Off}; // }; AnyFolder &RefHM = Main.Model.BodyModel; AnyFolder &ref=Main.Model.BodyModel.Trunk; //Neck driver AnyKinEqSimpleDriver NeckJntDriver = { AnyKinMeasure& lb = ...BodyModel.Interface.Trunk.SkullThoraxLateralBending; AnyKinMeasure& ar = ...BodyModel.Interface.Trunk.SkullThoraxRotation; AnyKinMeasure& fe = ...BodyModel.Interface.Trunk.SkullThoraxFlexion; DriverPos = pi/180*{.JntPos.NeckLateralBending, .JntPos.NeckRotation, .JntPos.NeckExtension}; DriverVel = pi/180*{.JntVel.NeckLateralBending, .JntVel.NeckRotation, .JntVel.NeckExtension}; Reaction.Type = {Off, Off, Off}; }; //Thorax pelvis rotation driver AnyKinEqSimpleDriver PostureDriver ={ AnyKinMeasure& Ref2 = ...BodyModel.Interface.Trunk.PelvisThoraxLateralBending; AnyKinMeasure& Ref3 = ...BodyModel.Interface.Trunk.PelvisThoraxRotation; AnyKinMeasure& Ref1 = ...BodyModel.Interface.Trunk.PelvisThoraxExtension; DriverPos = pi/180*{ .JntPos.PelvisThoraxLateralBending, .JntPos.PelvisThoraxRotation, .JntPos.PelvisThoraxExtension }; DriverVel = pi/180*{ .JntVel.PelvisThoraxLateralBending, .JntVel.PelvisThoraxRotation, .JntVel.PelvisThoraxExtension }; Reaction.Type = {Off,Off,Off}; }; // ************************************ // Drivers for the right arm // ************************************ //Sterno clavicular joint driver AnyKinEqSimpleDriver SCDriverRight ={ AnyKinMeasure& ref1 =...BodyModel.Interface.Right.SternoClavicularProtraction; AnyKinMeasure& ref2 =...BodyModel.Interface.Right.SternoClavicularElevation; DriverPos = pi/180*{ .JntPos.Right.SternoClavicularProtraction, .JntPos.Right.SternoClavicularElevation }; DriverVel = { .JntVel.Right.SternoClavicularProtraction, .JntVel.Right.SternoClavicularElevation }; Reaction.Type={Off,Off}; }; //Glenohumeral joint AnyKinEqSimpleDriver GHDriverRight={ AnyKinMeasure& ref1 =...BodyModel.Interface.Right.GlenohumeralAbduction; AnyKinMeasure& ref2 =...BodyModel.Interface.Right.GlenohumeralFlexion; AnyKinMeasure& ref3 =...BodyModel.Interface.Right.GlenohumeralExternalRotation; DriverPos=pi/180*{ .JntPos.Right.GlenohumeralAbduction, //GH joint .JntPos.Right.GlenohumeralFlexion, //GH joint .JntPos.Right.GlenohumeralExternalRotation //GH joint }; DriverVel = pi/180*{ .JntVel.Right.GlenohumeralAbduction, //GH joint .JntVel.Right.GlenohumeralFlexion, //GH joint .JntVel.Right.GlenohumeralExternalRotation //GH joint }; Reaction.Type={Off,Off,Off}; }; //Elbow flexion driver AnyKinEqSimpleDriver ElbowFEDriverRight={ AnyKinMeasureOrg &Elbow =...BodyModel.Interface.Right.ElbowFlexion; DriverPos=pi/180*{.JntPos.Right.ElbowFlexion}; DriverVel = pi/180*{.JntVel.Right.ElbowFlexion}; Reaction.Type={Off}; }; //Elbow pronation driver AnyKinEqSimpleDriver ElbowPSDriverRight={ AnyKinMeasure& Elbow =...BodyModel.Interface.Right.ElbowPronation; DriverPos = pi/180*{.JntPos.Right.ElbowPronation }; DriverVel=pi/180*{.JntVel.Right.ElbowPronation }; Reaction.Type={Off}; }; //Wrist driver AnyKinEqSimpleDriver WristDriverRight ={ AnyKinMeasure& ref1 =...BodyModel.Interface.Right.WristFlexion; AnyKinMeasure& ref2 =...BodyModel.Interface.Right.WristAbduction; DriverPos = pi/180*{ .JntPos.Right.WristFlexion, .JntPos.Right.WristAbduction }; DriverVel = pi/180*{ .JntVel.Right.WristFlexion, .JntVel.Right.WristAbduction}; Reaction.Type={Off,Off}; }; // ************************************ // Drivers for the left arm // ************************************ //Sterno clavicular joint driver AnyKinEqSimpleDriver SCDriverLeft ={ AnyKinMeasure& ref1 =...BodyModel.Interface.Left.SternoClavicularProtraction; AnyKinMeasure& ref2 =...BodyModel.Interface.Left.SternoClavicularElevation; DriverPos = pi/180*{ .JntPos.Left.SternoClavicularProtraction, .JntPos.Left.SternoClavicularElevation }; DriverVel = pi/180*{ .JntVel.Left.SternoClavicularProtraction, .JntVel.Left.SternoClavicularElevation }; Reaction.Type={Off,Off}; }; //Glenohumeral joint driver AnyKinEqSimpleDriver GHDriverLeft={ AnyKinMeasure& ref1 =...BodyModel.Interface.Left.GlenohumeralAbduction; AnyKinMeasure& ref2 =...BodyModel.Interface.Left.GlenohumeralFlexion; AnyKinMeasure& ref3 =...BodyModel.Interface.Left.GlenohumeralExternalRotation; DriverPos=pi/180*{ .JntPos.Left.GlenohumeralAbduction, //GH joint .JntPos.Left.GlenohumeralFlexion, //GH joint .JntPos.Left.GlenohumeralExternalRotation //GH joint }; DriverVel = pi/180*{ .JntVel.Left.GlenohumeralAbduction, //GH joint .JntVel.Left.GlenohumeralFlexion, //GH joint .JntVel.Left.GlenohumeralExternalRotation //GH joint }; Reaction.Type={Off,Off,Off}; }; //Elbow flexion driver AnyKinEqSimpleDriver ElbowFEDriverLeft={ AnyKinMeasureOrg &Elbow =...BodyModel.Interface.Left.ElbowFlexion; DriverPos=pi/180*{.JntPos.Left.ElbowFlexion}; DriverVel = pi/180*{.JntVel.Left.ElbowFlexion}; Reaction.Type={Off}; }; //Elbow pronation driver AnyKinEqSimpleDriver ElbowPSDriverLeft={ AnyKinMeasure& Elbow =...BodyModel.Interface.Left.ElbowPronation; DriverPos= pi/180*{.JntPos.Left.ElbowPronation }; DriverVel = pi/180*{.JntVel.Left.ElbowPronation }; Reaction.Type={Off}; }; //Wrist driver //Wrist driver AnyKinEqSimpleDriver WristDriverLeft ={ AnyKinMeasure& ref1 =...BodyModel.Interface.Left.WristFlexion; AnyKinMeasure& ref2 =...BodyModel.Interface.Left.WristAbduction; DriverPos = pi/180*{ .JntPos.Left.WristFlexion, .JntPos.Left.WristAbduction}; DriverVel = pi/180*{ .JntVel.Left.WristFlexion, .JntVel.Left.WristAbduction}; Reaction.Type={Off,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={ AnyKinMeasureOrg &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}; }; // ************************************ // Drivers for the Left leg // ************************************ //Left hip driver AnyKinEqSimpleDriver HipDriverLeft={ AnyKinMeasure& ref1 =...BodyModel.Interface.Left.HipFlexion; AnyKinMeasure& ref2 =...BodyModel.Interface.Left.HipExternalRotation; AnyKinMeasure& ref3 =...BodyModel.Interface.Left.HipAbduction; DriverPos=pi/180*{ .JntPos.Left.HipFlexion, .JntPos.Left.HipExternalRotation, .JntPos.Left.HipAbduction }; DriverVel = pi/180*{ .JntVel.Left.HipFlexion, .JntVel.Left.HipExternalRotation, .JntVel.Left.HipAbduction }; Reaction.Type={Off,Off,Off}; }; //Knee driver AnyKinEqSimpleDriver KneeDriverLeft={ AnyKinMeasure& Knee =...BodyModel.Interface.Left.KneeFlexion; DriverPos=pi/180*{ .JntPos.Left.KneeFlexion }; DriverVel = pi/180*{ .JntVel.Left.KneeFlexion }; Reaction.Type={Off}; }; //Ankle driver AnyKinEqSimpleDriver AnkleDriverLeft={ AnyKinMeasure& ref1=...BodyModel.Interface.Left.AnklePlantarFlexion; AnyKinMeasure& ref2=...BodyModel.Interface.Left.SubTalarEversion; DriverPos = pi/180*{.JntPos.Left.SubTalarEversion}; DriverVel=pi/180*{.JntVel.Left.SubTalarEversion}; Reaction.Type={Off}; MeasureOrganizer={1}; }; // Reaction forces and moments on the pelvis segment are required because there is no support force on both feet. AnyReacForce PelvisReactions = { AnyKinLinear lin = { AnyRefFrame& pelvis = ....BodyModel.Trunk.SegmentsLumbar.PelvisSeg; }; AnyKinRotational rot = { Type = RotAxesAngles; AnyRefFrame& pelvis = ....BodyModel.Trunk.SegmentsLumbar.PelvisSeg; }; }; };//Drivers // --------------------------------- // Loads from the Mannequin.any file // --------------------------------- AnyFolder MannequinLoads = { AnyFolder &hm = Main.Model.BodyModel; // For easy reference AnyFolder &mql = Main.Model.Mannequin.Load; AnyFolder Right = { AnyFolder &rhm = .hm.Right; AnyFolder &locmql = .mql.Right; AnyForce3D Shoulder = { AnyRefNode &ApplPoint = .rhm.ShoulderArm.Seg.Humerus.gh; F = .locmql.Shoulder; // AnyDrawVector drF = { // Vec = ..locmql.Shoulder.F/100; // Scale the length down // Line = { // Style = Line3DStyleFull; // Thickness = 0.01; // RGB = {1, 0, 0}; // End = { // Style = Line3DCapStyleArrow; // This specifies the end to be an arrowhead // RGB = {1, 0, 0}; // Thickness = 0.02; // The head begins with twice the thickness of the shaft // Length = 0.05; // }; // }; // // attach the arrow to the hand // AnyRefFrame &Shoulder = Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Clavicula.I_trapezius_clavicular_part_3; // }; }; }; // Right AnyFolder Left = { AnyFolder &lhm = .hm.Left; AnyFolder &locmql = .mql.Left; AnyForce3D Shoulder = { AnyRefNode &ApplPoint = .lhm.ShoulderArm.Seg.Humerus.gh; F = .locmql.Shoulder; // AnyDrawVector drF = { // Vec = ..locmql.Shoulder.F/100; // Scale the length down // Line = { // Style = Line3DStyleFull; // Thickness = 0.01; // RGB = {1, 0, 0}; // End = { // Style = Line3DCapStyleArrow; // This specifies the end to be an arrowhead // RGB = {1, 0, 0}; // Thickness = 0.02; // The head begins with twice the thickness of the shaft // Length = 0.05; // }; // }; // // attach the arrow to the hand // AnyRefFrame &Scapula = Main.HumanModel.BodyModel.Left.ShoulderArm.Seg.Clavicula.I_trapezius_clavicular_part_3; // }; }; }; // Left };