网站首页常识百科 >正文
想必现在有很多小伙伴对于求助!机器人足球方面的知识都比较想要了解,那么今天小好小编就为大家收集了一些关于求助!机器人足球方面的知识分享给大家,希望大家会喜欢哦。
这是三V三的,
现在的主流.
#ifndef Strategy_H
转载或者引用本文内容请注又明可来源近人于芝之士回答
#define Strategy_H
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the STRATEGY_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
着力自手治器身越复,商包局。
// that uses this DLL. This way any other project whose source files include this file see
和地能种化理两点数代已革,入世认张传写。
// STRATEGY_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef STRATEGY_EXPORTS
#define STRATEGY_API __declspec(dllexport)
#else
#define STRATEGY_API __declspec(dllimport)
#endif
#include
#include
const long PLAYERS_PER_SIDE = 5;
// gameState
const long FREE_BALL = 1;
const long PLACE_KICK = 2;
const long PENALTY_KICK = 3;
const long FREE_KICK = 4;
const long GOAL_KICK = 5;
// whosBall
const long ANYONES_BALL = 0;
const long BLUE_BALL = 1;
const long YELLOW_BALL = 2;
// global variables -- Useful field positions ... maybe???
//预先定义好地称的尺寸信息
const double FTOP = 77.2392; //Field Top Y coordinate
const double FBOT = 6.3730; //Field Bottom y coordinate
const double GTOPY = 49.6801; //Goal Top Y coordinate
const double GBOTY = 33.9320; //Goal Bottom coordinate
const double GRIGHT = 97.3632; //Right Goal Bach coordinate
const double GLEFT = 2.8748; //Left Goal Back coordinate
const double FRIGHTX = 93.4259; //Field Right x coordinate
const double FLEFTX = 6.8118; //Field Left x coordinate
const double OFFSET=4.5;
int max;
int min;
int mid1;
int mid2;
int min1,min2;
int Old_Role;
int Area1,Area2;
double RB_dis[5];
double RB_time[5];
double RB_angle[5];
double TOFFSET1;
double dis[6];
typedef struct //机器人坐标
{
double x, y, z;
} Vector3D;
typedef struct
{
double x, y;
} Vector2D;
typedef struct
{
long left, right, top, bottom;
} Bounds;
typedef struct //机器人信息
{
Vector3D pos; //机器人坐标
double rotation; //机器人方向角
double velocityLeft, velocityRight; //机器人左右轮速
} Robot;
typedef struct //对方机器人定义
{
Vector3D pos; //对方机器人位置坐标
double rotation; //对方机器人方向角
} OpponentRobot;
typedef struct //球信息定义
{
Vector3D pos;
} Ball;
typedef struct
{
double x,y;
} Point;
typedef struct //环境结构变量中边界的定义
{
double left, right, top, bottom; //边界信息
} Bounds1;
typedef struct //环境信息模型
{
Robot home[PLAYERS_PER_SIDE]; //本方机器人数据
OpponentRobot opponent[PLAYERS_PER_SIDE]; //对方机器人数据
Ball currentBall, lastBall, predictedBall; //球的数据
Bounds fieldBounds, goalBounds; //场地信息
long gameState; //比赛状态
long whosBall; //控球方
void *userData; //用户数据
} Environment;
int flagHome1Home2;
typedef void (*MyStrategyProc)(Environment*);
extern"C"STRATEGY_API void Create ( Environment *env ); // 比赛开始时系统调用,用于出市话用户定义的一些数据
extern"C"STRATEGY_API void Strategy ( Environment *env );//比赛过程中系统调用,每秒调用60次,仿真周期为1/60秒
extern"C"STRATEGY_API void Destroy ( Environment *env ); // 比赛结束后系统调用,释放空间
#endif // Strategy_H
本文到此结束,希望对大家有所帮助。
版权说明:本文由用户上传,如有侵权请联系删除!
- 上一篇:兔子的画法简笔画可爱(兔子简笔画的画法优质)
- 下一篇:最后一页
猜你喜欢:
- 2022-06-12兔子的画法简笔画可爱(兔子简笔画的画法优质)
- 2022-06-12张学友有哪些快歌(张学友的一首好听的快歌)
- 2022-06-12preventfrom造句简单(preventfrom造句复合句)
- 2022-06-12天龙八部游戏宝宝多少级可以繁殖(天龙八部里宝宝几级才能繁殖)
- 2022-06-12电脑怎么玩吃鸡手游(吃鸡怎么在电脑上玩)
- 2022-06-12李佳航演过哪些电视剧请告诉我电视剧的名字(李佳航演过哪些电视剧)
- 2022-06-12保税区企业与一般企业有什么区别(保税区企业\")
最新文章:
- 2022-06-12黑头会不会越清越多(黑头会不会越清理越多详细介绍)
- 2022-06-12小泽征尔的故事感想(小泽征尔的故事)
- 2022-06-12兔子的画法简笔画可爱(兔子简笔画的画法优质)
- 2022-06-12porker(face什么意思)
- 2022-06-12海尔智能音箱如何连接qq音乐(海尔智能音箱如何连接手机)
- 2022-06-12华为智能家居怎么添加红外遥控器(华为智能家居怎么添加路由器)
- 2022-06-12小度不能联网(小度不能联网怎么办)
- 2022-06-12小米10青春版有指纹样式吗(小米10青春版有指纹解锁吗)
- 2022-06-12应用行为记录在哪里看(应用行为记录在哪里看)
- 2022-06-12怎么把腾讯会议调成静音(怎么把腾讯会议调成静音)
- 2022-06-12荣耀x10不支持隐私空间(荣耀x10有隐私空间吗)
- 2022-06-12电子通讯录怎么做(电子通讯录怎么做)
- 2022-06-12ipad air3电池多少毫安(ipad air3电池多少毫安)
- 2022-06-12被子晒干了可以马上盖吗(被子晒完可以马上盖吗详细介绍)
- 2022-06-12三星s20关机键松动(三星s20关机键在哪里)
- 热点推荐
- 热评文章