|
@@ -66,7 +66,8 @@ void Aerobics::Process(int time_stamp, int* right_pos, int* right_att, int* righ
|
|
|
memset(right_global_pos, 0, 3 * sizeof(float));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ //static int time_count;
|
|
|
+ //std::cout << time_count++ << std::endl;
|
|
|
//设置单脚的空中命令状态,使得命令在空中只判断一次,区别于触地才能触发的命令。
|
|
|
|
|
|
//如果触发了抬脚命令,那么触地的时候,将不会触发下端,用一个禁止下蹲倒计来计时
|
|
@@ -182,10 +183,10 @@ void Aerobics::setResult(deque<shoes_data_cell>& step_data_vector,int LEFT_OR_RI
|
|
|
float roll = step_data_vector.back().roll;
|
|
|
|
|
|
//暂时先将抬脚的高度阈值为0.1m, 伸脚的距离设置为0.2m
|
|
|
- if ( plane_length > 0.3)
|
|
|
+ if ( plane_length > 0.2)
|
|
|
{
|
|
|
//if (LEFT_OR_RIGHT == LEFT_FOOT && stretch_left_status == 1 && roll > -2.9f && roll < 0.0f)
|
|
|
- if (LEFT_OR_RIGHT == LEFT_FOOT && stretch_left_status == 1 && roll > 1.8f)
|
|
|
+ if (LEFT_OR_RIGHT == LEFT_FOOT && stretch_left_status == 1 && roll > 1.55f)
|
|
|
{
|
|
|
std::cout << "MOTION_STRETCH_LEFT : " << "左侧踢"<< endl;
|
|
|
result[0] = MOTION_STRETCH_LEFT;
|
|
@@ -193,7 +194,7 @@ void Aerobics::setResult(deque<shoes_data_cell>& step_data_vector,int LEFT_OR_RI
|
|
|
lift_left_status = 0;
|
|
|
stretch_front_left_status = 0;
|
|
|
}
|
|
|
- else if(LEFT_OR_RIGHT == RIGHT_FOOT && stretch_right_status == 1 && roll > 1.8f)
|
|
|
+ else if(LEFT_OR_RIGHT == RIGHT_FOOT && stretch_right_status == 1 && roll > 1.55f)
|
|
|
{
|
|
|
std::cout << "MOTION_STRETCH_RIGHT: " << "右侧踢" << endl;
|
|
|
result[0] = MOTION_STRETCH_RIGHT;
|
|
@@ -236,8 +237,12 @@ void Aerobics::setResult(deque<shoes_data_cell>& step_data_vector,int LEFT_OR_RI
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (plane_length > 0.3)
|
|
|
+ if (plane_length > 0.2)
|
|
|
{
|
|
|
+ if (LEFT_OR_RIGHT == RIGHT_FOOT)
|
|
|
+ {
|
|
|
+ std::cout << "step_data_vector.back().pos_y : " << step_data_vector.back().pos_y << std::endl;
|
|
|
+ }
|
|
|
std::cout << "test : plane_length > 0.2" << endl;
|
|
|
}
|
|
|
|