⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 common.h

📁 robocuo相关资料robocuo相关资料
💻 H
字号:
#ifndef _COMMON_H#define _COMMON_H#include <iostream>#include <string>#include <vector>#include "Geometry.h"#include "Matrix.h"void joint_name_to_number(const std::string &, int &, int &);int flag_name_to_number(const std::string &);extern std::string joint_number_to_name[];extern std::string flag_number_to_name[];extern std::string limb_name[];// Flags enum#define F1L 0#define F2L 1#define F1R 2#define F2R 3#define G1L 4#define G2L 5#define G1R 6#define G2R 7enum situation_e{	SARPAA,	YEVAR,	DAMAR,	TAVAZ,};enum joint_e{LAJ1,LAJ2,RAJ1,RAJ2,LAJ3,RAJ3,LAJ4,RAJ4,LLJ1,RLJ1,LLJ2,LLJ3,RLJ2,RLJ3,LLJ4,RLJ4,LLJ5,LLJ6,RLJ5,RLJ6,HJ1,HJ2};enum limb_e{	Torso,	Neck,	Head,	RightShoulder,	LeftShoulder,	RightUpperarm,	LeftUpperarm,	RightElbow,	LeftElbow,	RightLowerArm,	LeftLowerArm,	RightHip1,	LeftHip1,	RightHip2,	LeftHip2,	RightThigh,	LeftThigh,	RightShank,	LeftShank,	RightAnkle,	LeftAnkle,	RightFoot,	LeftFoot,};enum play_mode_e{	BEFOR_KICK_OFF,	KICK_OFF_LEFT,	KICK_OFF_RIGHT,	PLAY_ON,	KICK_IN_LEFT,	KICK_IN_RIGHT,	CORNER_KICK_LEFT,	CORNER_KICK_RIGHT,	GOAL_KICK_LEFT,	GOAL_KICK_RIGHT,	OFFSIDE_LEFT,	OFFSIDE_RIGHT,	GAME_OVER,	GOAL_LEFT,	GOAL_RIGHT,	FREE_KICK_LEFT,	FREE_KICK_RIGHT};play_mode_e play_mode_name_to_enum(std::string);struct agent{	int id;	Vector3d vision_position,global_position;	agent();	agent(int, Vector3d);};struct flag{	Vector3d global_position;	Vector3d vision_position;	Vector3d relative_position;//	vector3d vision_position_clear;};struct joint{	double rate;	double angle;	double update_time;	double previous_angle;	double previous_update_time;};struct limb{	Matrix mat;};struct command{	command();	double power[20];};struct state{	state();	double min_time;	double max_time;	double angle[20];	double gain[20];	double precision[20];	bool   imp[20];};struct action{	action();	bool load(std::istream &);	void save(std::ostream &);	int repeat;	std::string name;	std::vector<state> arr;};struct trajectory{	trajectory();	void load(std::istream &);	std::vector<command> arr;	std::string name;	int repeat;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -