Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Posture_and_movement/Downloads/Kick1.any
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ Main = {
AnyRefFrame &Thigh = .Shank.Knee;
};

AnyKinEqSimpleDriver HipDriver = {
DriverPos = {-90*pi/180};
DriverVel = {90*pi/180}/..MyStudy.tEnd;
AnyKinDriver HipDriver = {
DriverPos0 = {-90*pi/180};
DriverVel0 = {90*pi/180}/..MyStudy.tEnd;
AnyRevoluteJoint &Joint = .Hip;
};

AnyKinEqSimpleDriver KneeDriver = {
DriverPos = {-90*pi/180};
DriverVel = {90*pi/180}/..MyStudy.tEnd;
AnyKinDriver KneeDriver = {
DriverPos0 = {-90*pi/180};
DriverVel0 = {90*pi/180}/..MyStudy.tEnd;
AnyRevoluteJoint &Joint = .Knee;
};

Expand Down
112 changes: 112 additions & 0 deletions Posture_and_movement/Snippets/Intro/Kick.main.any
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
// This model optimizes a football kicking motion of a two-segment
// leg. The objective is to obtain maximum impact velocity within the
// given strength of the leg.

Main = {

// The model
AnyFolder MyModel = {

// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
AnyDrawRefFrame drw = {
ScaleXYZ = {1,1,1}/5;
};
}; // Global reference frame

// The thigh and shank segments both presume a center of
// mass placed one third of the length from their proximal
// ends
AnySeg Thigh = {
AnyVar Length = 0.45;
Mass = 7.5;
Jii = Mass*{1,0.05,1}/100;
AnyDrawSeg drw = {};
r0 = {0,-Length/2,0};
AnyRefNode Hip = {
sRel = {0,.Length/3,0};
};
AnyRefNode Knee = {
sRel = {0,-2*.Length/3,0};
};
};

AnySeg Shank = {
AnyVar Length = 0.50;
Mass = 3.5;
Jii = Mass*{1,0.05,1}/100;
r0 = {0,-.Thigh.Length-Length/2,0};
AnyDrawSeg drw = {};
AnyRefNode Knee = {
sRel = {0,.Length/3,0};
};
AnyRefNode Foot = {
sRel = {0,-2*.Length/3,0};
};
};

// We presume 2-D conditions and therefore use
// revolute joints for the hip as well as the knee.
AnyRevoluteJoint Hip = {
AnyRefFrame &Ground = .GlobalRef;
AnyRefFrame &Thigh = .Thigh.Hip;
};
AnyRevoluteJoint Knee = {
AnyRefFrame &Ground = .Thigh.Knee;
AnyRefFrame &Thigh = .Shank.Knee;
};

AnyKinDriver HipDriver = {
DriverPos0 = {-90*pi/180};
DriverVel0 = {90*pi/180}/..MyStudy.tEnd;
AnyRevoluteJoint &Joint = .Hip;
};

//# BEGIN SNIPPET 1
AnyKinDriver KneeDriver = {
DriverPos0 = {-90*pi/180};
DriverVel0 = {90*pi/180}/..MyStudy.tEnd;
AnyRevoluteJoint &Joint = .Knee;
};

§// Hip joint muscles
AnyMuscleGeneric HipFlex = {
MuscleModel = &MusMdl;
Type = NonNegative;
AnyRevoluteJoint &Joint = .Hip;
AnyMuscleModel MusMdl = {F0 = 232;};
};

AnyMuscleGeneric HipExtend = {
MuscleModel = &MusMdl;
Type = NonPositive;
AnyRevoluteJoint &Joint = .Hip;
AnyMuscleModel MusMdl = {F0 = 251;};
};

// Knee joint muscles
AnyMuscleGeneric KneeExtend = {
MuscleModel = &MusMdl;
Type = NonNegative;
AnyRevoluteJoint &Joint = .Knee;
AnyMuscleModel MusMdl = {F0 = 554;};
};

AnyMuscleGeneric KneeFlex = {
MuscleModel = &MusMdl;
Type = NonPositive;
AnyRevoluteJoint &Joint = .Knee;
AnyMuscleModel MusMdl = {F0 = 236;};
};§
//# END SNIPPET 1

}; // MyModel

// The study: Operations to be performed on the model
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
Gravity = {0.0, -9.81, 0.0};
nStep = 50;
tEnd = 0.2;
};
}; // Main
114 changes: 114 additions & 0 deletions Posture_and_movement/Snippets/Intro/Kick2.main.any
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
// This model optimizes a football kicking motion of a two-segment
// leg. The objective is to obtain maximum impact velocity within the
// given strength of the leg.

Main = {

// The model
AnyFolder MyModel = {

// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
AnyDrawRefFrame drw = {
ScaleXYZ = {1,1,1}/5;
};
}; // Global reference frame

// The thigh and shank segments both presume a center of
// mass placed one third of the length from their proximal
// ends
AnySeg Thigh = {
AnyVar Length = 0.45;
Mass = 7.5;
Jii = Mass*{1,0.05,1}/100;
AnyDrawSeg drw = {};
r0 = {0,-Length/2,0};
AnyRefNode Hip = {
sRel = {0,.Length/3,0};
};
AnyRefNode Knee = {
sRel = {0,-2*.Length/3,0};
};
};

AnySeg Shank = {
AnyVar Length = 0.50;
Mass = 3.5;
Jii = Mass*{1,0.05,1}/100;
r0 = {0,-.Thigh.Length-Length/2,0};
AnyDrawSeg drw = {};
AnyRefNode Knee = {
sRel = {0,.Length/3,0};
};
AnyRefNode Foot = {
sRel = {0,-2*.Length/3,0};
};
};

// We presume 2-D conditions and therefore use
// revolute joints for the hip as well as the knee.
AnyRevoluteJoint Hip = {
AnyRefFrame &Ground = .GlobalRef;
AnyRefFrame &Thigh = .Thigh.Hip;
};
AnyRevoluteJoint Knee = {
AnyRefFrame &Ground = .Thigh.Knee;
AnyRefFrame &Thigh = .Shank.Knee;
};

//# BEGIN SNIPPET 1
AnyKinDriver HipDriver = {
DriverPos0 = {-90*pi/180};
DriverVel0 = {90*pi/180}/..MyStudy.tEnd;
§Reaction.Type = {Off};§
AnyRevoluteJoint &Joint = .Hip;
};

AnyKinDriver KneeDriver = {
DriverPos0 = {-90*pi/180};
DriverVel0 = {90*pi/180}/..MyStudy.tEnd;
§Reaction.Type = {Off};§
AnyRevoluteJoint &Joint = .Knee;
};
//# END SNIPPET 1

// Hip joint muscles
AnyMuscleGeneric HipFlex = {
MuscleModel = &MusMdl;
Type = NonNegative;
AnyRevoluteJoint &Joint = .Hip;
AnyMuscleModel MusMdl = {F0 = 232;};
};

AnyMuscleGeneric HipExtend = {
MuscleModel = &MusMdl;
Type = NonPositive;
AnyRevoluteJoint &Joint = .Hip;
AnyMuscleModel MusMdl = {F0 = 251;};
};

// Knee joint muscles
AnyMuscleGeneric KneeExtend = {
MuscleModel = &MusMdl;
Type = NonNegative;
AnyRevoluteJoint &Joint = .Knee;
AnyMuscleModel MusMdl = {F0 = 554;};
};

AnyMuscleGeneric KneeFlex = {
MuscleModel = &MusMdl;
Type = NonPositive;
AnyRevoluteJoint &Joint = .Knee;
AnyMuscleModel MusMdl = {F0 = 236;};
};

}; // MyModel

// The study: Operations to be performed on the model
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
Gravity = {0.0, -9.81, 0.0};
nStep = 50;
tEnd = 0.2;
};
}; // Main
139 changes: 139 additions & 0 deletions Posture_and_movement/Snippets/Intro/Kick3.main.any
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
// This model optimizes a football kicking motion of a two-segment
// leg. The objective is to obtain maximum impact velocity within the
// given strength of the leg.

Main = {

// The model
AnyFolder MyModel = {

// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
AnyDrawRefFrame drw = {
ScaleXYZ = {1,1,1}/5;
};
}; // Global reference frame

// The thigh and shank segments both presume a center of
// mass placed one third of the length from their proximal
// ends
AnySeg Thigh = {
AnyVar Length = 0.45;
Mass = 7.5;
Jii = Mass*{1,0.05,1}/100;
AnyDrawSeg drw = {};
r0 = {0,-Length/2,0};
AnyRefNode Hip = {
sRel = {0,.Length/3,0};
};
AnyRefNode Knee = {
sRel = {0,-2*.Length/3,0};
};
};

AnySeg Shank = {
AnyVar Length = 0.50;
Mass = 3.5;
Jii = Mass*{1,0.05,1}/100;
r0 = {0,-.Thigh.Length-Length/2,0};
AnyDrawSeg drw = {};
AnyRefNode Knee = {
sRel = {0,.Length/3,0};
};
AnyRefNode Foot = {
sRel = {0,-2*.Length/3,0};
};
};

// We presume 2-D conditions and therefore use
// revolute joints for the hip as well as the knee.
AnyRevoluteJoint Hip = {
AnyRefFrame &Ground = .GlobalRef;
AnyRefFrame &Thigh = .Thigh.Hip;
};
AnyRevoluteJoint Knee = {
AnyRefFrame &Ground = .Thigh.Knee;
AnyRefFrame &Thigh = .Shank.Knee;
};

//# BEGIN SNIPPET 1
§//§ AnyKinDriver HipDriver = {
§//§ DriverPos0 = {-90*pi/180};
§//§ DriverVel0 = {90*pi/180}/..MyStudy.tEnd;
§//§ Reaction.Type = {Off};
§//§ AnyRevoluteJoint &Joint = .Hip;
§//§ };

§//§ AnyKinDriver KneeDriver = {
§//§ DriverPos0 = {-90*pi/180};
§//§ DriverVel0 = {90*pi/180}/..MyStudy.tEnd;
§//§ Reaction.Type = {Off};
§//§ AnyRevoluteJoint &Joint = .Knee;
§//§ };

§// Some initial guesses for the hip and knee angle
// movements.
AnyKinEqInterPolDriver HipDriver = {
T = {0, 0.25, 0.50, 0.75, 1}*..MyStudy.tEnd;
Data = {{-30, -30, -15, 0, 30}}*pi/180;
Type = Bspline;
BsplineOrder = 4;
AnyRevoluteJoint &Joint = .Hip;
Reaction.Type = {Off};
};

AnyKinEqInterPolDriver KneeDriver = {
T = {0, 0.25, 0.50, 0.75, 1}*..MyStudy.tEnd;
Data = {{-70, -70, -50, -40, -30}}*pi/180;
Type = Bspline;
BsplineOrder = 4;
AnyRevoluteJoint &Joint = .Knee;
Reaction.Type = {Off};
};§
//# END SNIPPET 1

// Hip joint muscles
AnyMuscleGeneric HipFlex = {
MuscleModel = &MusMdl;
Type = NonNegative;
AnyRevoluteJoint &Joint = .Hip;
AnyMuscleModel MusMdl = {F0 = 232;};
};

AnyMuscleGeneric HipExtend = {
MuscleModel = &MusMdl;
Type = NonPositive;
AnyRevoluteJoint &Joint = .Hip;
AnyMuscleModel MusMdl = {F0 = 251;};
};

// Knee joint muscles
AnyMuscleGeneric KneeExtend = {
MuscleModel = &MusMdl;
Type = NonNegative;
AnyRevoluteJoint &Joint = .Knee;
AnyMuscleModel MusMdl = {F0 = 554;};
};

AnyMuscleGeneric KneeFlex = {
MuscleModel = &MusMdl;
Type = NonPositive;
AnyRevoluteJoint &Joint = .Knee;
AnyMuscleModel MusMdl = {F0 = 236;};
};

}; // MyModel
//# BEGIN SNIPPET 2
// The study: Operations to be performed on the model
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
InverseDynamics.Criterion.Type = MR_MinMaxStrict;
Gravity = {0.0, -9.81, 0.0};
nStep = 50;
tEnd = 0.2;
§AnyOutputFun BallVel= {
Val = 1.5*Main.MyModel.Shank.Mass*Main.MyModel.Shank.rDot[0]/(0.2+Main.MyModel.Shank.Mass);
};§
};
//# END SNIPPET 2
}; // Main
Loading