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

📄 motion.h

📁 robocup源代码2001年清华机器人源代码
💻 H
字号:
/*
    Copyright (C) 2001  Tsinghuaeolus

    Authors : ChenJiang, YaoJinyi, CaiYunpeng, Lishi

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

	If you make any changes or have any comments we would appreciate a 
	message to yjy01@mails.tsinghua.edu.cn.
*/

#ifndef _motion
#define _motion

#include "bpn.h"
#include "types.h"
#include "Command.h"
#include "Strategy.h"
#include "interception.h"
#include "dribble.h"
#include "pass.h"
#include "visualsystem.h"
#include "auditorysystem.h"
#include "shoot.h"
#include "goalie.h"
#include "positioning.h"
#include "clearball.h"
#include "handleball.h"

/******            simple behaviors           *********/

class Behaviors : public Interception, public VisualSystem, public Pass, public Positioning, public AuditoryProcess, public Dribble, public Shoot, public Goalie,  public ClearBall, public Handleball{
private:
	double decided_angle, desire;
public:
	Behaviors();
	void Reset();

/*******************   basic behaviors ***************/
	bool go_to(Vector pos, float rapidness, Command& command);
	bool go_to(Vector pos, float rapidness); // execute at once
	bool smartgoto(Vector pos, float speed);// execute at once
	bool smartgoto(Vector pos, float speed, Command& command);
	AngleDeg turn_to(AngleDeg ang, Command& command);
	AngleDeg turn_to(AngleDeg ang); // execute at once
	AngleDeg turn_to(Vector pos, Command& command);
	AngleDeg turn_to(Vector pos); // execute at once
	bool smartturn(AngleDeg ang, Command& command);
	bool smartturn(AngleDeg ang); // execute at once
	AngleDeg turn_neck_to(AngleDeg ang, AngleDeg bdfy, Command& command);
	AngleDeg turn_neck_to(AngleDeg ang, Command& command);
	AngleDeg turn_neck_to(AngleDeg ang); // execute at once
	bool run(float rapidness, Command& command);
	bool run(float rapidness);  // execute at once
	bool stay(Command& command);
	bool stay();
	bool seize(Command& command);
	bool seize();
	bool donothing(Command& command);
	bool donothing();
	bool circumambulate(Vector pos, float rapidness);
	bool circumambulate(Vector pos, float rapidness, Command& command);
/***************************************************************/
	bool within_range(Vector& pos);

	bool infield(Vector pos); // check if it is in the field
	bool incourt(Vector pos); // check if it is in the court
	friend class laceKick;
};

#endif

⌨️ 快捷键说明

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