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

📄 worldmodel.h

📁 对于2D ROBOCUP底层传球和定位球方面进行了严格的修改该
💻 H
📖 第 1 页 / 共 3 页
字号:
		BallStatusT   getCheckBallStatus ( ) const;		bool          setCheckBallStatus ( BallStatusT    bs );		bool          getRecvThink ( );		char*         getCommunicationString ( );		bool          setCommunicationString ( char*          srt );		ObjectT       getObjectFocus ( );		bool          setObjectFocus ( ObjectT        obj );		// iterate over a specific object set		ObjectT       iterateObjectStart ( int            &iIndex,		                                   ObjectSetT     g,		                                   double         dConf = -1.0,		                                   bool           bForward = false );		ObjectT       iterateObjectNext ( int            &iIndex,		                                  ObjectSetT     g,		                                  double         dConf = -1.0,		                                  bool           bForward = false );		void          iterateObjectDone ( int            &iIndex );		// get and set methods for agent information		ObjectT       getAgentObjectType ( ) const;		int           getAgentIndex ( ) const;		bool          setAgentObjectType ( ObjectT        o );		AngDeg        getAgentBodyAngleRelToNeck ( ) const;		AngDeg        getAgentGlobalNeckAngle ( ) const;		AngDeg        getAgentGlobalBodyAngle ( );		Stamina       getAgentStamina ( ) const;		TiredNessT    getAgentTiredNess ( ) const;		double        getAgentEffort ( ) const;		VecPosition   getAgentGlobalVelocity ( ) const;		double        getAgentSpeed ( ) const;		VecPosition   getAgentGlobalPosition ( ) const;		bool          setAgentViewAngle ( ViewAngleT     va ) ;		ViewAngleT    getAgentViewAngle ( ) const;		bool          setAgentViewQuality ( ViewQualityT   vq ) ;		ViewQualityT  getAgentViewQuality ( ) const;		double        getAgentViewFrequency ( ViewAngleT     va = VA_ILLEGAL,		                                      ViewQualityT   vq = VQ_ILLEGAL );		bool          getAgentArmMovable ( );		VecPosition   getAgentArmPosition ( );		int           getAgentArmExpires ( );		// get methods for ball information		VecPosition   getBallPos ( );		double        getBallSpeed ( );		AngDeg        getBallDirection ( );		// get method for different information about a specific object		Time          getTimeGlobalPosition ( ObjectT        o );		VecPosition   getGlobalPosition ( ObjectT        o );		Time          getTimeGlobalVelocity ( ObjectT        o );		VecPosition   getGlobalVelocity ( ObjectT        o );		double        getRelativeDistance ( ObjectT        o );		VecPosition   getRelativePosition ( ObjectT        o );		AngDeg        getRelativeAngle ( ObjectT        o,		                                 bool           bWithBody = false );		Time          getTimeGlobalAngles ( ObjectT        o );		AngDeg        getGlobalBodyAngle ( ObjectT        o );		AngDeg        getGlobalNeckAngle ( ObjectT        o );		AngDeg        getGlobalAngle ( ObjectT        o );		double        getConfidence ( ObjectT        o );		bool          isKnownPlayer ( ObjectT        o );		ObjectT       getOppGoalieType ( );		ObjectT       getOwnGoalieType ( );		Time          getTimeLastSeen ( ObjectT        o );		Time          getTimeChangeInformation ( ObjectT        o );		VecPosition   getGlobalPositionLastSee ( ObjectT        o );		Time          getTimeGlobalPositionLastSee ( ObjectT       o );		VecPosition   getGlobalVelocityLastSee ( ObjectT        o );		AngDeg        getGlobalBodyAngleLastSee ( ObjectT        o );		int           getTackleExpires ( ObjectT        o =OBJECT_ILLEGAL );		AngDeg        getGlobalArmDirection ( ObjectT        o );		Time          getTimeGlobalArmDirection ( ObjectT        o );		double        getProbTackleSucceeds ( ObjectT        o = OBJECT_ILLEGAL,		                                      int            iExtraCycles = 0,		                                      VecPosition    *pos = NULL );		double        getProbTackleClosestOpp ( int            iExtraCycles = 0 );		list<ObjectT> getListCloseOpponents ( VecPosition    pos,		                                      double         dDist = 15 );		// set methods for objects		bool          setIsKnownPlayer ( ObjectT        o,		                                 bool           isKnownPlayer );		bool          setTimeLastSeen ( ObjectT        o,		                                Time           time );		bool          setHeteroPlayerType ( ObjectT        o,		                                    int            iPlayer );		// formation information		PlayerT       getPlayerType ( ObjectT        o =OBJECT_ILLEGAL );		bool          isInPlayerSet ( ObjectT        o,		                              PlayerSetT     ps );		// get method for information about goals		VecPosition   getPosOpponentGoal ( );		VecPosition   getPosOwnGoal ( );		double        getRelDistanceOpponentGoal ( );		AngDeg        getRelAngleOpponentGoal ( );		ObjectT       getLastOpponentDefender ( double         *dX = NULL );		// get and methods about fixed specifications (heterogeneous players)		HeteroPlayerSettings getInfoHeteroPlayer ( int            iIndex );		HeteroPlayerSettings getHeteroInfoPlayer ( ObjectT        obj );		int           getHeteroPlayerType ( ObjectT        obj );		bool          setSubstitutedOpp ( ObjectT        obj );		ObjectT       getSubstitutedOpp ( );		double        getDashPowerRate ( ObjectT        obj );		double        getPlayerSpeedMax ( ObjectT        obj );		double        getPlayerDecay ( ObjectT        obj );		double        getMaximalKickDist ( ObjectT        obj );		double        getStaminaIncMax ( ObjectT        obj );		double        getPlayerSize ( ObjectT        obj );		double        getInertiaMoment ( ObjectT        obj );		double        getEffortMax ( ObjectT        obj );		double        getEffectiveMaxSpeed ( ObjectT        obj,		                                     bool           bWithNoise =false );		// get method about previous commands		bool          isQueuedActionPerformed ( );		// methods that return truth values about current play mode        //只有三种最基本的状态 isBeforeKickOff		//isDeadBallUs isDeadballThem 剩下的状况分别属于这三种情况之一 具体内容参见WorldModle.cpp		bool          isFreeKickUs        ( PlayModeT pm = PM_ILLEGAL );   //如果是我们的任意球		bool          isFreeKickThem      ( PlayModeT pm = PM_ILLEGAL );   //如果是他们的任意球		bool          isCornerKickUs      ( PlayModeT pm = PM_ILLEGAL );   //如果是我们的角球		bool          isCornerKickThem    ( PlayModeT pm = PM_ILLEGAL );   //如果是他们的角球		bool          isOffsideUs         ( PlayModeT pm = PM_ILLEGAL );   //我们越位		bool          isOffsideThem       ( PlayModeT pm = PM_ILLEGAL );   //他们越位		bool          isKickInUs          ( PlayModeT pm = PM_ILLEGAL );   //我们边线球		bool          isKickInThem        ( PlayModeT pm = PM_ILLEGAL );   //他们边线球		bool          isFreeKickFaultUs   ( PlayModeT pm = PM_ILLEGAL );   //我们任意球犯规		bool          isFreeKickFaultThem ( PlayModeT pm = PM_ILLEGAL );   //他们任意球犯规		bool          isKickOffUs 	  ( PlayModeT pm = PM_ILLEGAL );   //我们开球		bool          isKickOffThem 	  ( PlayModeT pm = PM_ILLEGAL );   //他们开球		bool          isBackPassUs 	  ( PlayModeT pm = PM_ILLEGAL );   //我们的回传球犯规		bool          isBackPassThem 	  ( PlayModeT pm = PM_ILLEGAL );   //他们的回传球犯规		bool          isGoalKickUs 	  ( PlayModeT pm = PM_ILLEGAL );   //我们门球 ?		bool          isGoalKickThem 	  ( PlayModeT pm = PM_ILLEGAL );   //他们门球 ?		bool          isBeforeKickOff 	  ( PlayModeT pm = PM_ILLEGAL );   //开球之前		bool          isDeadBallUs 	  ( PlayModeT pm = PM_ILLEGAL );   //我们死球		bool          isDeadBallThem 	  ( PlayModeT pm = PM_ILLEGAL );   //他们死球		bool          isPenaltyUs 	  ( PlayModeT pm = PM_ILLEGAL );   //我们处罚球		bool          isPenaltyThem 	  ( PlayModeT pm = PM_ILLEGAL );   //他们处罚球		bool          isFullStateOn 	  ( SideT     s  = SIDE_ILLEGAL ); //		// various methods		bool          setChangeViewCommand ( SoccerCommand  soc );		SoccerCommand getChangeViewCommand ( );		SideT         getSidePenalty ( );		bool          setSidePenalty ( SideT          side );		////////////////////////// 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 );

⌨️ 快捷键说明

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