|
@@ -182,28 +182,30 @@ 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 (high > high_thresh && plane_length > 0.2)
|
|
|
+ if ( plane_length > 0.3)
|
|
|
{
|
|
|
//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 > 2.0f)
|
|
|
+ if (LEFT_OR_RIGHT == LEFT_FOOT && stretch_left_status == 1 && roll > 1.8f)
|
|
|
{
|
|
|
- std::cout << "MOTION_STRETCH_LEFT" << endl;
|
|
|
+ std::cout << "MOTION_STRETCH_LEFT : " << "左侧踢"<< endl;
|
|
|
result[0] = MOTION_STRETCH_LEFT;
|
|
|
stretch_left_status = 0;
|
|
|
lift_left_status = 0;
|
|
|
+ stretch_front_left_status = 0;
|
|
|
}
|
|
|
- else if(LEFT_OR_RIGHT == RIGHT_FOOT && stretch_right_status == 1 && roll > 2.0f)
|
|
|
+ else if(LEFT_OR_RIGHT == RIGHT_FOOT && stretch_right_status == 1 && roll > 1.8f)
|
|
|
{
|
|
|
- std::cout << "MOTION_STRETCH_RIGHT" << endl;
|
|
|
+ std::cout << "MOTION_STRETCH_RIGHT: " << "右侧踢" << endl;
|
|
|
result[0] = MOTION_STRETCH_RIGHT;
|
|
|
stretch_right_status = 0;
|
|
|
lift_right_status = 0;
|
|
|
+ stretch_front_right_status = 0;
|
|
|
}
|
|
|
|
|
|
if (LEFT_OR_RIGHT == LEFT_FOOT && stretch_front_left_status == 1
|
|
|
&& step_data_vector.back().pos_y > 0.2f)
|
|
|
{
|
|
|
- std::cout << "MOTION_STRETCH_FRONT_LEFT" << endl;
|
|
|
+ std::cout << "MOTION_STRETCH_FRONT_LEFT: " << "左前踢" << endl;
|
|
|
result[0] = MOTION_STRETCH_FRONT_LEFT;
|
|
|
stretch_front_left_status = 0;
|
|
|
lift_left_status = 0;
|
|
@@ -211,7 +213,7 @@ void Aerobics::setResult(deque<shoes_data_cell>& step_data_vector,int LEFT_OR_RI
|
|
|
else if (LEFT_OR_RIGHT == RIGHT_FOOT && stretch_front_right_status == 1
|
|
|
&& step_data_vector.back().pos_y > 0.2f)
|
|
|
{
|
|
|
- std::cout << "MOTION_STRETCH_FRONT_RIGHT" << endl;
|
|
|
+ std::cout << "MOTION_STRETCH_FRONT_RIGHT" << "右前踢" << endl;
|
|
|
result[0] = MOTION_STRETCH_FRONT_RIGHT;
|
|
|
stretch_front_right_status = 0;
|
|
|
lift_right_status = 0;
|
|
@@ -222,19 +224,19 @@ void Aerobics::setResult(deque<shoes_data_cell>& step_data_vector,int LEFT_OR_RI
|
|
|
{
|
|
|
if (LEFT_OR_RIGHT == LEFT_FOOT && lift_left_status == 1)
|
|
|
{
|
|
|
- std::cout << "MOTION_LIFT_LEFT" << endl;
|
|
|
+ std::cout << "MOTION_LIFT_LEFT " << "左抬脚" << endl;
|
|
|
result[0] = MOTION_LIFT_LEFT;
|
|
|
lift_left_status = 0;
|
|
|
}
|
|
|
else if (LEFT_OR_RIGHT == RIGHT_FOOT && lift_right_status == 1)
|
|
|
{
|
|
|
- std::cout << "MOTION_LIFT_RIGHT" << endl;
|
|
|
+ std::cout << "MOTION_LIFT_RIGHT " << "右抬脚" << endl;
|
|
|
result[0] = MOTION_LIFT_RIGHT;
|
|
|
lift_right_status = 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /*if (plane_length > 0.2)
|
|
|
+ if (plane_length > 0.3)
|
|
|
{
|
|
|
std::cout << "test : plane_length > 0.2" << endl;
|
|
|
}
|
|
@@ -242,5 +244,5 @@ void Aerobics::setResult(deque<shoes_data_cell>& step_data_vector,int LEFT_OR_RI
|
|
|
if (high > high_thresh)
|
|
|
{
|
|
|
std::cout << "high > high_thresh" << endl;
|
|
|
- }*/
|
|
|
+ }
|
|
|
}
|