Corrected header file include guards.

Dependencies:   FiniteStateMachine HipControl Knee LinearBlend1 LocalFileSystem_Read dataComm hapticFeedback initExoVars mbed Blend_Generator Brad_poly_gait Gait_Generator MM_gait Encoders IMUdriver

Fork of Motion Control by HEL's Angels

Revision:
9:9bbbd124bf50
Parent:
8:5766a09fefbf
--- a/gaitGenerator/gaitGenerator.cpp	Wed Mar 04 02:43:44 2015 +0000
+++ b/gaitGenerator/gaitGenerator.cpp	Thu Mar 05 06:48:13 2015 +0000
@@ -1,3 +1,5 @@
+// Last edited by H. Cashdollar  03Mar2015
+
 #include "mbed.h"
 #include "gaitGenerator.h"
 
@@ -5,23 +7,26 @@
 * This parameter is adjusted to the individual pilot
 * sittingAngle is the angle of the hips(degrees) during normal sit
 */
+//PARAMETER ADJUSTMENT - Sitting Angle
+//Steven=79
 const float sittingAngle=79;
-
+//Person 1
+//const float sittingAngle=79;
+//Person 2
+//const float sittingAngle=79;
 
 /** Create bentAngle instance
 * This parameter is adjusted to the individual pilot
 * bentAngle is the angle of the hips (degrees) during bent forward sit
 * Pilot must bend forward as an intermediate stage between sit and stand
 */
+//PARAMETER ADJUSTMENT - Bent Forward Angle
+//Steven=115
 const float bentAngle=115;
-
-/** Create standingAngle instance
-* This parameter is adjusted to the individual pilot
-* TODO(Cashdollar): Define use case for this parameter.
-This parameter is adjusted to the individual pilot
-*/
-//const int FTG_time=sizeof(ref_stance_FTG)/sizeof(ref_stance_FTG[0]);
-//const float standingAngle=ref_stance_FTG[FTG_time-1];
+//Person 1
+//const float bentAngle=115;
+//Person 2
+//const float bentAngle=115;
 
 // timing variables:
 // gait generation times
@@ -32,12 +37,12 @@
 
 /** Create tSittingDown instance
 * Used in FSM state() sitting down
-//TODO(Cashdollar): Is this something that needs to be parameterized?
+//TODO: May want to parameterize this.
 */
 const float tSittingDown = 4;
 
 /** Create blend_L instance
-* TODO(Cashdollar): Is this used properly? blend_R is also an instance of the LinearBlend class and is defined in FSM.h
+* TODO: remove if not used
 */
 float blend_R;
 float blend_L;
@@ -59,6 +64,7 @@
 //const float t_blend_sitDown = .5;
 //const float backBias=0;
 
+// This is steven's stance step
 const float ref_stance_step[] = {
     10.0000,  9.9644,  9.9288,  9.8932,  9.8576,  9.8220,  9.7864,  9.7508,  9.7152,  9.6796,
     9.6440,  9.6085,  9.5729,  9.5373,  9.5017,  9.4661,  9.4305,  9.3949,  9.3593,  9.3237,
@@ -502,6 +508,7 @@
 
 };
 
+// this is a vector with length 500, all zeros
 const float ref_stance_FTG[] = {
     0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,
     0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,  0.0000,
@@ -1320,9 +1327,12 @@
 // Unused?
 //const int step_time=sizeof(ref_stance_step)/sizeof(ref_stance_step[0]);
 
-//TODO(Cashdollar): Would like to move this to the top of the file but needs to be down here
+//TODO: Would like to move this to the top of the file but needs to be down here
+// (500*4)/(4)=500
 const int FTG_time=sizeof(ref_stance_FTG)/sizeof(ref_stance_FTG[0]);
+
 // Used in FSM as an input to blend
+// standing angle is the last entry in the FTG array
 const float standingAngle=ref_stance_FTG[FTG_time-1];
 
 //Moved to top:
@@ -1344,3 +1354,20 @@
 // Moved to top:
 //float blend_R;
 //float blend_L;
+
+//TODO(Cashdollar): remove these tests if they aren't completed
+// Time of maximum hip flexion
+// Range from 50%(slow) to 30%(fast)
+float t_maxFlex = 0.6;
+
+// Time it takes to complete one step
+// Range from 1.5s(slow) to 0.8s(fast)
+float step_time_max = 1.5;
+float step_time;
+
+// Time it takes to complete one step
+// Range from 1.5s(slow) to 0.8s(fast)
+float start_swing;
+float end_swing;
+float start_stand;
+float end_stand;
\ No newline at end of file