📄 traction.h
字号:
#ifndef _Traction_h_DEFINED
#define _Traction_h_DEFINED
#define TP_PRECISION 20 // Time Parameter
#define BACK_STRIDE_LENGTH_PRECISION 20
#define TURN_PRECISION 12
#define STRAFE_PRECISION 10
#define NUM_TRACTION_JOINTS 8
#define ARRAY_SIZE 20000
// This is the old traction stuff .. I left in case I screwed something
class Traction {
public :
struct Data {
int count;
double total;
double sqrTotal;
};
Traction();
void LoadParameters();
void SetTraining(bool training) { isTraining = training; }
bool GetTraining() { return isTraining; }
void DoTractionSensing(double stepFrequency, double timeParameter, double backStrideLength, double turn, double strafe);
int type;
private :
bool isTraining;
bool isTrainingContinue;
bool isTractionControl;
double lastTime;
int errors[NUM_TRACTION_JOINTS];
Data items[TP_PRECISION][BACK_STRIDE_LENGTH_PRECISION][TURN_PRECISION][STRAFE_PRECISION][NUM_TRACTION_JOINTS];
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -