?? robotstruct.h
字號:
#ifndef ROBOT_STRUCT_H
#define ROBOT_STRUCT_H
namespace personal_RobotParmspace
{
#define ROBOTS 7
/**額外添加的部分機器人參數,為速度估計準備**/
#define ROBOT_WHEEL_DIS 550//機器人左右輪距單位為毫米
#define OrientationBase 1.57079632679490//機器人當前朝向在機器人坐標系中的角度,單位弧度
/*********************************/
enum Role{attacker,assistAttackerOne,assistAttackerTwo,defender,assistDefenderOne,assistDefenderTwo,goalKeeper};
/*enum State{normal,special};*/
enum State{normal,kickOutBoundary,defendOutBoundary,kickCornerBall,defendCornerBall,kickGoleBall,defendGoleBall,
kickBeforDoorPoint,defendBeforeDoorPoint,deadBall,stop,kickFreeBall,defendFreeBall};
enum GameState{blue_Kickoff='K',blue_FreeKick='F',blue_CornerKick='C',blue_GoaledTheTarget='G',blue_ThrowIn='T',blue_PenaltyKick='P',
Yellow_Kickoff='k',Yellow_FreeKick='f',Yellow_CornerKick='c',Yellow_GoaledTheTarget='g',Yellow_ThrowIn='t',Yellow_PenaltyKick='p',
StartGame='s',StopGame='o',DroppedBall='d',Endhalf='e',InRunning='i'};//輸入為O時返回StopGame
typedef struct Robot
{
Role role;
float translationX;
float translationZ;
float rotation;
}Robot;
typedef struct Ball
{
float translationX;
float translationZ;
}Ball;
typedef struct SpecialObs
{
bool exist;
float translationX;
float translationZ;//此結構體存儲開場發球時把球當作障礙物時球的坐標
}SpecialObs;
typedef struct Position
{
float translationX;
float translationZ;
}Position;
typedef struct WorldInfo
{
State stateInfo;//決定是正常比賽狀態還是裁判狀態
Robot robotInfo[ROBOTS];
Ball ballInfo;
int area;
Position leaderPos;
SpecialObs specialObsInfo;
}WorldInfo;
}
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -