📄 bodydecision.h
字号:
/* * Copyright 2002-2004, Mersad Team, Allame Helli High School (NODET). * * This program is free software, you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation. * * This program 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 Library General Public License for more details. * * Created by: Ahmad Boorghany * Released on Friday 1 April 2005 by Mersad RoboCup Team. * For more information please read README file.*/#ifndef __BODY_DECISION_H#define __BODY_DECISION_H#include <vector>#include <SayDecision.h>#include <HeadDecision.h>#include <AdvancedAction.h>struct AdvancedActionWeights{ float alpha; float power; float rate; AdvancedActionWeights(float alpha, float power, float rate): alpha(alpha), power(power), rate(rate) {}};class BodyDecision{protected: Command *command; std::vector<AdvancedAction *> advancedActions; std::vector<AdvancedActionWeights> weights; std::vector<int> quickLevels; std::vector<float> values; void addAdvancedAction(AdvancedAction *advancedAction, AdvancedActionWeights weight, int quickLevel); const WorldModel *worldModel; SayDecisionFlags &sayFlags; TurnNeckMode &turnNeckMode; void resetValues(); void resetWeights(); void resetQuickLevels();public: BodyDecision(const WorldModel *worldModel, SayDecisionFlags &sayFlags, TurnNeckMode &turnNeckMode); virtual ~BodyDecision(); void updateAfterSenseBody(); virtual DecideType decide(int quickLevel); Command *getCommand();};#endif // __BODY_DECISION_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -