a b/Application/Examples/StandingModelScalingDisplay/Model/JointsAndDrivers.any
1
/* ----------------------------------------------------------------
2
   Drivers for a standing model:
3
   
4
   - The two feet are constrained forward/backward and vertically (x & y)
5
   - The pelvis is constrained laterally (z)
6
   - The CoM is constrained forward/backward and laterally above the origin.
7
   
8
   The remaining degrees of freedom (with the exception of a few shoulder
9
   movements) are controlled by parameters in the mannequin.any file.
10
   
11
   The forces defined in the mannequin.any file are attached to the body
12
   locations at the bottom of this file.
13
   
14
   John Rasmussen, March 5, 2004.
15
   ----------------------------------------------------------------  */
16
17
AnyFolder Drivers = {
18
  
19
  //#include "<ANYBODY_PATH_BODY>/BodyModels/include/MannequinDrivers.any"
20
  
21
  // Aliases for convenient referencing
22
  AnyFolder &JntPos=..Mannequin.Posture;  
23
  AnyFolder &JntVel=..Mannequin.PostureVel;  
24
  
25
  AnyFolder &LegR = ..BodyModel.Right.Leg;
26
  AnyFolder &LegL = ..BodyModel.Left.Leg;
27
  
28
  AnyFolder &RefHM = Main.Model.BodyModel;
29
30
31
32
  //Constraint the collective CoM to be right above the GlobalRef
33
  AnyKinEqSimpleDriver CoMDriver = {
34
    AnyKinCoM CoM = {
35
      AnyFolder &Body = Main.Model.BodyModel;
36
    };
37
    MeasureOrganizer = {0,2};  // Only the x and z directions
38
    DriverPos = {0,0};
39
    DriverVel = {0,0};
40
    Reaction.Type = {Off,Off};
41
  };  
42
  
43
  #include "TrunkDrivers.any"
44
  
45
  #if BM_ARM_RIGHT == ON
46
    #include "RightArmDrivers.any"
47
    #if BM_ARM_DETAILED_HAND == ON
48
      #include "RightHandDrivers.any"
49
    #endif
50
  #endif
51
  
52
  
53
  #if BM_ARM_LEFT == ON
54
    #include "LeftArmDrivers.any"
55
    #if BM_ARM_DETAILED_HAND == ON
56
      #include "LeftHandDrivers.any"
57
    #endif
58
  #endif
59
  
60
  
61
  #if BM_LEG_RIGHT & (BM_LEG_MODEL == _LEG_MODEL_LEG_)
62
    #include "RightLegDrivers.any"
63
  #endif
64
  
65
  
66
  #if BM_LEG_LEFT & (BM_LEG_MODEL == _LEG_MODEL_LEG_)
67
    #include "LeftLegDrivers.any"
68
  #endif
69
  
70
  
71
  #if BM_LEG_RIGHT & BM_LEG_MODEL_IS_TLEM
72
    #include "RightLegTDDrivers.any"
73
  #endif
74
  
75
  
76
  #if BM_LEG_LEFT & BM_LEG_MODEL_IS_TLEM
77
    #include "LeftLegTDDrivers.any"
78
  #endif
79
  
80
  //Loads from the Mannequin file.
81
  AnyFolder MannequinLoads = {
82
    AnyFolder &hm = Main.Model.BodyModel;  // For easy reference
83
    AnyFolder &mql = Main.Model.Mannequin.Load;
84
    
85
    AnyFolder Right = {
86
      AnyFolder &rhm = .hm.Right;
87
      AnyFolder &locmql = .mql.Right;
88
    };  // Right
89
    
90
    AnyFolder Left = {
91
      AnyFolder &lhm = .hm.Left;
92
      AnyFolder &locmql = .mql.Left;
93
    };  // Left
94
  };
95
96
  
97
};//Drivers