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

📄 objects.h

📁 2003年RoboCup仿真组世界冠军源代码 足球机器人 仿真组 的源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
class PlayerObject: public DynamicObject{protected:  bool    isKnownPlayer;         /*!< are we sure about player number        */  ObjectT objRangeMin;           /*!< Minimum in range of possible player obj*/  ObjectT objRangeMax;           /*!< Maximum in range of possible player obj*/  bool    isGoalie;              /*!< is this object a goalie                */  AngDeg  angGlobalBodyAngle;    /*!< Global body angle                      */  AngDeg  angGlobalNeckAngle;    /*!< Global neck angle                      */  AngDeg  angGlobalBodyAngleLastSee;/*!< Global body angle from last see msg */  Time    timeGlobalAngles;      /*!< Server time of global angles           */  int     iHeteroPlayerType;     /*!< index of heterogeneous player type     */  Time    m_timeTackle;          /*!< time tackle command was observerd      */  AngDeg  m_angGlobalArm;        /*!< global pointing direction of arm       */  Time    m_timeGlobalArm;       /*!< time arm last seen                     */ private:  AngDeg  angRelativeBodyAngle;  /*!< Relative body angle to main player */  AngDeg  angRelativeNeckAngle;  /*!< Relative neck angle to main player */  Time    timeRelativeAngles;    /*!< Server time of relative angles     */public:  PlayerObject( );  void    show( ostream & os = cout );  void    show( const char * strTeamName, ostream & os = cout );  // standard get and set methods  bool    setPossibleRange     ( ObjectT objMin, ObjectT objMax );  bool    isInRange            ( ObjectT obj,    bool bTeamFirst);  ObjectT getMinRange          (                                );  ObjectT getMaxRange          (                                );    bool    setIsKnownPlayer     ( bool     b                     );  bool    getIsKnownPlayer     (                                ) const;  bool    setIsGoalie          ( bool     b                     );  bool    getIsGoalie          (                                ) const;  bool    setRelativeBodyAngle ( AngDeg   ang,   Time    time   );  AngDeg  getRelativeBodyAngle (                                ) const;  bool    setGlobalBodyAngle   ( AngDeg   ang,   Time    time   );  AngDeg  getGlobalBodyAngle   (                                ) const;  bool    setRelativeNeckAngle ( AngDeg   ang,   Time    time   );  AngDeg  getRelativeNeckAngle (                                ) const;  bool    setGlobalNeckAngle   ( AngDeg   ang,   Time    time   );  AngDeg  getGlobalNeckAngle   (                                ) const;  bool    setTimeRelativeAngles( Time     time                  );  Time    getTimeRelativeAngles(                                ) const;  bool    setTimeGlobalAngles  ( Time     time                  );  Time    getTimeGlobalAngles  (                                ) const;  bool    setGlobalBodyAngleLastSee( AngDeg ang                 );  AngDeg  getGlobalBodyAngleLastSee(                            ) const;  bool    setHeteroPlayerType  ( int      index                 ) ;  int     getHeteroPlayerType  (                                ) const;      bool    setTimeTackle        ( Time     time                  );  Time    getTimeTackle        (                                ) const;  bool    setGlobalArm         ( AngDeg   ang,   Time    time   );  AngDeg  getGlobalArm         (                                ) const;  bool    setTimeGlobalArm     ( Time     time                  );  Time    getTimeGlobalArm     (                                ) const;};/*****************************************************************************//********************* CLASS BALLOBJECT **************************************//*****************************************************************************//*! Class PlayerObject contains RoboCup information that is available for the    ball. No extra variables are added to superclass DynamicObject*/class BallObject: public DynamicObject{public:  BallObject();  void show( ostream & os = cout );};/*****************************************************************************//********************* CLASS STAMINA *****************************************//*****************************************************************************//*! The following stamina information is stored in this class.     - actual stamina     - recovery, determines how much stamina recovers each cycle, decreases                  below a certain threshold (never increases)     - effort, determines which percentage of dash power is actually used.                  decreases below certain threshold, increases above a higher                  threshold.*/class Stamina{  double m_dStamina;              /*!< Stamina value (>0)                */  double m_dEffort;               /*!< Effort value (0..1)               */  double m_dRecovery;             /*!< Recovery (0..1)                   */public:  Stamina( double dSta = 4000.0, double dEff=1.0, double dRec=1.0 );  void         show        ( ostream & os = cout                     );  // return value how tired an agent is	TiredNessT   getTiredNess( double dRecDecThr,   double dStaminaMax );	  // standard get and set methods.  double       getStamina  (                                         ) const;  bool         setStamina  ( double d                                );  double       getEffort   (                                         ) const;  bool         setEffort   ( double d                                );  double       getRecovery (                                         ) const;  bool         setRecovery ( double d                                );};/*****************************************************************************//********************* CLASS AGENTOBJECT *************************************//*****************************************************************************//*! Class AgentObject contains RoboCup information that is available for the    agent. New variables are declared that extend a normal PlayerObject.*/class AgentObject: public PlayerObject{  ViewAngleT   viewAngle;             /*!< View angle of this agent          */  ViewQualityT viewQuality;           /*!< View quality of this agent        */  Stamina      stamina;               /*!< Stamina (stamina, effort, recovery*/  VecPosition  velSpeedRelToNeck;     /*!< Velocity vector relative to neck  */  AngDeg       angBodyAngleRelToNeck; /*!< Relative angle of body with neck  */  VecPosition  posPositionDifference; /*!< Global pos difference with lastsee*/  bool         m_bArmMovable;         /*!< Indicates whether can move arm.   */  int          m_iArmExpires;         /*!< Nr. of cycles till arm expires    */  VecPosition  m_posGlobalArm;       ;/*!< Global point to which arm point   */  int          m_iTackleExpires;      /*!< Nr. of cycles till tackle expires */ public:  AgentObject( double dStaminaMax = 4000 );  void         show( ostream & os = cout );  void         show( const char * strTeamName, ostream & os = cout );  // standard get and set methods  VecPosition  getPositionDifference(                  ) const;  bool         setPositionDifference( VecPosition  v   );  ViewAngleT   getViewAngle         (                  ) const;  bool         setViewAngle         ( ViewAngleT   v   );  ViewQualityT getViewQuality       (                  ) const;  bool         setViewQuality       ( ViewQualityT v   );  Stamina      getStamina           (                  ) const;  bool         setStamina           ( Stamina      sta );  VecPosition  getSpeedRelToNeck    (                  ) const;  bool         setSpeedRelToNeck    ( VecPosition  v   );  bool         setGlobalNeckAngle   ( AngDeg       ang );  AngDeg       getBodyAngleRelToNeck(                  ) const;  bool         setBodyAngleRelToNeck( AngDeg       ang );  bool         getArmMovable        (                  ) const;  bool         setArmMovable        ( bool         b   );  int          getArmExpires        (                  ) const;  bool         setArmExpires        ( int          i   );  VecPosition  getGlobalArmPosition (                  ) const;  bool         setGlobalArmPosition ( VecPosition  v   );  int          getTackleExpires     (                  ) const;  bool         setTackleExpires     ( int          i   );   } ;#endif

⌨️ 快捷键说明

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