Switch to unified view

a b/Tests/Symmetry/DynamicTest/FreePostureFullBodyStatic.Main.any
1
#include "../libdef.any"
2
3
/** ----------------------------------------------------------------------------
4
This model uses the full body model, i.e. most of the body parts available
5
in the AAUHuman part of the Body directory. The model is grounded at the
6
pelvis and the posture if the model is controlled through a mannequin.any 
7
file by means of joint angles.
8
9
This application is a really good starting point for new applications 
10
involving the entire body.
11
12
The model do not contain muscles and is only intended for running kinematic analysis
13
14
The model has several configurations which can be changed in the file "Config.any"
15
16
BodyModelSelection can be either "FullBodyModel"  or "FullBodySRHand" 
17
FullBodyModel is a fullbody model
18
FullBodyModelSRHand is a fullbody model with a detailed hand and shoulder rhythm
19
20
CONFIGURATION2 can be either "FreePostureStatic" or "FreePostureMove"
21
FreePostureStatic is a static model which do not move its joint angles are controlled in the "mannequin.any" file 
22
FreePostureMove is a dynamic model controlled through angles which can be set in the "MannequinInterpolation.any" file
23
24
25
---------------------------------------------------------------------------- */
26
Main = {
27
28
  // ----------------------------------------------------------
29
  // Driver type settings
30
  // ----------------------------------------------------------
31
  #ifndef DriverSelection
32
    #define DriverSelection "FreePostureStatic"
33
  #endif
34
35
  // ----------------------------------------------------------
36
  // Path to draw settings
37
  // ----------------------------------------------------------
38
  #include "Model/DrawSettings.any"
39
  
40
  // ----------------------------------------------------------
41
  // Model configuration:
42
  // For more info on body model configuration options please load the model and double click on: 
43
  // #path HTML_DOC "<AMMR_PATH_DOC>/bm_config/index.html"
44
  // ----------------------------------------------------------
45
  
46
  // The model is without muscles
47
//  #define BM_LEG_MUSCLES_LEFT OFF
48
//  #define BM_LEG_MUSCLES_RIGHT OFF
49
//  #define BM_ARM_MUSCLES_LEFT OFF
50
//  #define BM_ARM_MUSCLES_RIGHT OFF
51
//  #define BM_TRUNK_MUSCLES OFF
52
  
53
  // Remove default drivers
54
  #define BM_MANNEQUIN_DRIVER_DEFAULT OFF
55
  
56
  // The Mannequin file specifies load-time positions for all the segments
57
  // in the HumanModel. This is important for the model's ablity to resolve
58
  // all the kinematic constraints when the model is analyzed.
59
  // The mannequin file also drives those degrees of freedom of the human 
60
  // model that are not governed by problem-specific drivers at run time.    
61
  
62
  #if DriverSelection == "FreePostureStatic"
63
    // use different initial positions for two configurations
64
    #include "Model/Mannequin.any" 
65
  #else //#if DriverSelection == "FreePostureMove"
66
    // use different initial positions for two configurations
67
    #include "Model/MannequinInterpolation.any" 
68
  #endif
69
  
70
  // Model of the human body to be used for the analysis  
71
  #include "<ANYBODY_PATH_BODY>/HumanModel.any"
72
  
73
  // The actual model where all components are assembled
74
  AnyFolder Model={
75
    /// Body model without default drivers
76
    AnyFolder &BodyModel=.HumanModel.BodyModel;
77
    /// Reference to the mannequin folder (used by drivers)
78
    AnyFolder &Mannequin =.HumanModel.Mannequin;
79
    
80
    #include "Model/Environment.any"   
81
    
82
    /// Constraints and drivers
83
    AnyFolder ModelEnvironmentConnection = {    
84
     #if DriverSelection == "FreePostureStatic"
85
         #include "Model/JointsAndDriversConstant.any"
86
     #else //#if DriverSelection == "FreePostureMove"
87
         #include "Model/JointsAndDriversInterpolation.any"
88
     #endif
89
    };
90
    
91
  };
92
  
93
  AnyBodyStudy Study = {
94
    
95
    Kinematics.KinematicTol =1e-8;
96
    // Prevent the switching of solvers
97
    InverseDynamics.Criterion.UpperBoundOnOff = Off;
98
    
99
    AnyFolder &Model = .Model;
100
    tEnd = 0.98;
101
    Gravity = {0.0, -9.81, 0.0};
102
    
103
    #if DriverSelection=="FreePostureStatic"
104
    nStep = 1;
105
    #endif
106
    
107
    #if DriverSelection=="FreePostureMove"
108
    nStep = 50;
109
    #endif   
110
    
111
    #include "Model/MuscleSymmetryCheck.any"
112
  
113
  }; // End of study
114
115
  // Include an operation sequence to run all required steps of your application (see Operations tab)
116
    #include "<ANYBODY_PATH_MODELUTILS>\Operations\RunAppSequence.any"
117
  
118
}; //Main
119