1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #include "PublicSDKMotion.h"
- #include "pub.h"
- class Kongfu : public PublicSDKMotion
- {
- public:
- Kongfu();
- void setData(deque<shoes_data_cell>& shoes_data_vector, int time_stamp, float pos_x, float pos_y, float pos_z, float heading, float pitch, float roll, int zupt, int rssi);
- virtual void Process(int time_stamp, int* right_pos, int* right_att, int* right_acc, int right_zupt, int right_front_press, int right_back_press,
- int* left_pos, int* left_att, int* left_acc, int left_zupt, int left_front_press, int left_back_press,
- int jump, int down, int rssi);
- virtual void getResult(int* dec);
- virtual float getGamePos(int left_or_right, int index);
- void setPolarAccUnzupt(int* max_acc, int* min_acc, int* acc, int zupt);
- bool unzuptValid(int* max_acc, int* min_acc);
- private:
- deque<shoes_data_cell> left_shoes_data_vector;
- deque<shoes_data_cell> right_shoes_data_vector;
- vector<float> left_acc_x_buff;
- vector<float> right_acc_x_buff;
- int left_kick;
- int last_left_kick;
- int left_kick_wait;
- int right_kick;
- int last_right_kick;
- int right_kick_wait;
- int CANCLE_FLOOR_CMD_LEFT;
- int CANCLE_FLOOR_CMD_RIGHT;
- int resultMatrix[4];
- int last_left_zupt;
- int last_right_zupt;
- int last_jump;
- int last_down;
- int CANCLE_DOWN;
- int CANCLE_JUMP;
- int valid_down_wait_time;
- int valid_jump_wait_time;
- float left_global_pos[3];
- float right_global_pos[3];
- int max_acc_unzupt_left[3];
- int min_acc_unzupt_left[3];
- int max_acc_unzupt_right[3];
- int min_acc_unzupt_right[3];
- const int WAIT_TIME = 10;
- };
|