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

📄 worldmodel.h

📁 University of Amsterdam的2003年robocup源程序代码
💻 H
📖 第 1 页 / 共 4 页
字号:
  ////////////////////////// UPDATE METHODS (WorldModelUpdate.C)///////////////  // processing new information about the objects (filling World Model).  void          processSeeGlobalInfo       ( ObjectT        o,                                             Time           time,                                             VecPosition    pos,                                             VecPosition    vel,                                             AngDeg         angBody,                                             AngDeg         angNeck          );  bool          processNewAgentInfo        ( ViewQualityT   vq,                                             ViewAngleT     va,                                             double         dStamina,                                             double         dEffort,                                             double         dSpeed,                                             AngDeg         angSpeed,                                             AngDeg         angHeadAngle,                                             int            iTackleExpires,                                             int            iArmMovable,                                              int            iArmExpires,                                              VecPosition    posArm           ); void           processNewObjectInfo       ( ObjectT        o,                                             Time           time,                                             double         dDist,                                             int            iDir,                                             double         dDistChange,                                             double         dDirChange,                                             AngDeg         angRelBodyAng,                                             AngDeg         angRelNeckAng,                                             bool           isGoalie,                                             ObjectT        objMin,                                             ObjectT        objMax,                                             double         dPointDir,                                             bool           isTackling       ); bool           processPerfectHearInfo     ( ObjectT        o,                                             VecPosition    pos,                                             double         dConf,                                             bool           bIsGoalie=0      ); bool           processPerfectHearInfoBall ( VecPosition    pos,                                             VecPosition    vel,                                             double         dConf            ); bool           processUnsureHearInfo      ( ObjectT        o,                                             VecPosition    pos,                                             double         dConf            ); bool           processNewHeteroPlayer     ( int            iIndex,                                             double         dPlayerSpeedMax,                                             double         dStaminaIncMax,                                             double         dPlayerDecay,                                             double         dInertiaMoment,                                             double         dDashPowerRate,                                             double         dPlayerSize,                                             double         dKickableMargin,                                             double         dKickRand,                                             double         dExtraStamina,                                             double         dEffortMax,                                             double         dEffortMin       );  void          processCatchedBall         ( RefereeMessageT rm,                                             Time           time             );  void          processQueuedCommands      ( SoccerCommand  commands[],                                             int            iCommands        );  bool          storePlayerMessage         ( int            iPlayer,                                             char           *strMsg,                                             int            iCycle           );  bool          processPlayerMessage       (                                 );  bool          processRecvThink           ( bool           b                );  // update methods (defined in WorldModelUpdate.C)  bool          updateAll                  (                                 );  // update with prediction for new cycle  bool          updateAfterSenseMessage    (                                 );private:  // update with new visual information  void          processLastSeeMessage      (                                 );  bool          updateAfterSeeMessage      (                                 );  bool          updateAgentObjectAfterSee  (                                 );  bool          updateDynamicObjectAfterSee( ObjectT        o                );  // update new cycle  void          processLastSenseMessage    (                                 );  bool          updateAgentAndBallAfterSense(                                );  bool          updateBallAfterKick        ( SoccerCommand  soc              );  bool          updateDynamicObjectForNextCycle( ObjectT    o,                                             int            iCycle           );  bool          updateBallForCollision     ( VecPosition    posAgent         );  // update from relative to global and vice versa  bool          updateRelativeFromGlobal   (                                 );  bool          updateObjectRelativeFromGlobal( ObjectT     o                );  // methods to determine agent state from perceived information  bool          calculateStateAgent        ( VecPosition    *posGlobal,                                             VecPosition    *velGlobal,                                             AngDeg         *angGlobal       );  void          initParticlesAgent         ( AngDeg         angGlobal        );  void          initParticlesAgent         ( VecPosition    posInitital      );  int           checkParticlesAgent        ( AngDeg         angGlobalNeck    );  void          updateParticlesAgent       ( VecPosition    vel,                                             bool           bAfterSense      );  VecPosition   averageParticles           ( VecPosition    posArray[],                                             int            iLength          );  void          resampleParticlesAgent     ( int            iLeft            );  bool          calculateStateAgent2       ( VecPosition    *posGlobal,                                             VecPosition    *velGlobal,                                             AngDeg         *angGlobal       );  bool          calculateStateAgent3       ( VecPosition    *posGlobal,                                             VecPosition    *velGlobal,                                             AngDeg         *angGlobal       );  VecPosition   calculatePosAgentWith2Flags( ObjectT        objFlag1,                                             ObjectT        objFlag2         );  AngDeg        calculateAngleAgentWithPos ( VecPosition    pos              );  // methods to determine ball state from perceived information  bool          calculateStateBall         ( VecPosition    *posGlobal,                                             VecPosition    *velGlobal       );  void          initParticlesBall         (  VecPosition    posArray[],                                             VecPosition    velArray[],                                             int            iLength          );  void          checkParticlesBall        (  VecPosition    posArray[],                                             VecPosition    velArray[],                                             int            iLength,                                             int            *iNrLeft         );  void          updateParticlesBall       (  VecPosition    posArray[],                                             VecPosition    velArray[],                                             int            iLength,                                             double         dPower,                                             AngDeg         ang              );  void          resampleParticlesBall      ( VecPosition    posArray[],                                             VecPosition    velArray[],                                             int            iLength,                                             int            iLeft            );  ObjectT       getMaxRangeUnknownPlayer   ( ObjectT        obj,                                             char*          strMsg           );  VecPosition   calculateVelocityDynamicObject( ObjectT     o                );  // methods to determine player state from perceived information  bool          calculateStatePlayer       ( ObjectT        o,                                             VecPosition    *posGlobal,                                             VecPosition    *velGlobal       );  // methods to calculate noise range (quantized noise)  bool          getMinMaxDistQuantizeValue ( double         dInput,                                             double         *dMin,                                             double         *dMax,                                             double         x1,                                             double         x2               );  bool          getMinMaxDirChange         ( double         dOutput,                                             double         *dMin,                                             double         *dMax,                                             double         x1               );  bool          getMinMaxDistChange        ( double         dOutput,                                             double         dDist,                                             double         *dMin,                                             double         *dMax,                                             double         x1,                                             double         xDist1,                                             double         xDist2           );  double        invQuantizeMin             ( double         dOutput,                                             double         dQuantizeStep    );  double        invQuantizeMax             ( double         dOutput,                                             double         dQuantizeStep    );public:  // various update methods  void          mapUnknownPlayers          ( Time           time             );  bool          updateSSToHeteroPlayerType ( int            iPlayerType      );  bool          resetTimeObjects           (                                 );  void          removeGhosts               (                                 );  ////////////////////////// PREDICTIONS (WorldModelPredict.C) ////////////////  // predictions of worldmodel about future states of different objects  bool          predictStateAfterCommand   ( SoccerCommand  com,                                             VecPosition    *pos,                                             VecPosition    *vel,                                             AngDeg         *angGlobalBody,                                             AngDeg         *angGlobalNeck,                                             ObjectT        obj=OBJECT_ILLEGAL,                                             Stamina        *sta = NULL      );  bool          predictAgentStateAfterCommand(SoccerCommand com,                                             VecPosition    *pos,                                             VecPosition    *vel,                                             AngDeg         *angBody,                                             AngDeg         *angNeck,                                             Stamina        *sta             );  bool          predictObjectStateAfterCommand( ObjectT     obj,                                             SoccerCommand com,                                             VecPosition    *pos,                                             VecPosition    *vel,                                             AngDeg         *angBody,                                             AngDeg         *angNeck,                                             Stamina        *sta             );  VecPosition   predictAgentPosAfterCommand( SoccerCommand  com              );  void          predictStateAfterDash      ( double         dActualPower,                                             VecPosition    *pos,                                             VecPosition    *vel,                                             Stamina        *sta,                                             double         dDirection,                                             ObjectT        o=OBJECT_ILLEGAL);  void          predictStateAfterTurn      ( AngDeg         dSendAngle,                                             VecPosition    *pos,                                             VecPosition    *vel,                                             AngDeg         *angBody,                                             AngDeg         *angNeck,                                             ObjectT        obj=OBJECT_ILLEGAL,                                             Stamina        *sta = NULL      );  void          predictBallInfoAfterCommand( SoccerCommand  soc,                                             VecPosition    *pos = NULL,                                             VecPosition    *vel = NULL      );  VecPosition   predictPosAfterNrCycles    ( ObjectT        o,                                             double         dCycles,                                             int            iDashPower = 100,                                             VecPosition    *posIn = NULL,                                             VecPosition    *velIn = NULL,                                             bool           bUpdate = true   );  VecPosition   predictAgentPos            ( int            iCycles,                                             int            iDashPower = 0   );  VecPosition   predictFinalAgentPos       ( VecPosition    *pos = NULL,                                             VecPosition    *vel = NULL      );  int           predictNrCyclesForDistance ( ObjectT        o,

⌨️ 快捷键说明

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