Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/BehaviorControl/CommonXabsl2Symbols/RobotPoseSymbols.h

Go to the documentation of this file.
00001 /** 
00002 * @file RobotPoseSymbols.h
00003 *
00004 * Declaration of class RobotPoseSymbols.
00005 *
00006 * @author Martin Lötzsch
00007 */
00008 
00009 #ifndef __RobotPoseSymbols_h_
00010 #define __RobotPoseSymbols_h_
00011 
00012 #include "../BehaviorControl.h"
00013 #include "Tools/Xabsl2/Xabsl2Engine/Xabsl2Engine.h"
00014 #include "Tools/FieldDimensions.h"
00015 #include "Tools/Actorics/RobotDimensions.h"
00016 
00017 /**
00018 * The Xabsl2 symbols that are defined in "robot-pose-symbols.xml"
00019 *
00020 * @author Martin Lötzsch
00021 */ 
00022 class RobotPoseSymbols : public Xabsl2FunctionProvider, public BehaviorControlInterfaces
00023 {
00024 public:
00025 /*
00026 * Constructor.
00027 * @param interfaces The paramters of the BehaviorControl module.
00028   */
00029   RobotPoseSymbols(const BehaviorControlInterfaces& interfaces);
00030   
00031   /** registers the symbols at an engine */
00032   void registerSymbols(Xabsl2Engine& engine);
00033   
00034     /** updates the symbols */
00035   void update();
00036 
00037   //!@name Input symbols, more input symbols are actually registered than shown here (see .cpp file!)
00038   //!@{
00039   double getAngleToCenterOfField(); /*!< calculates the value for the symbol "robot-pose.best-angle-away-from-own-goal" */
00040   double getAngle(); /*!< A function for the symbol "robot-pose.angle" */
00041   double getPositionStandardDeviation();/*!< A function for the symbol "robot-pose.position-standard-deviation" */
00042   double getAngleToBorder(); /*!< A function for the symbol "robot-pose.angle-to-border" */
00043   double getDistanceToBorder(); /*!< A function for the symbol "robot-pose.distance-to-border" */
00044   double getDistanceToOwnGoal(); /*!< A function for the symbol "robot-pose.distance-to-own-goal" */
00045   double getDistanceToOwnPenaltyArea(); /*!< A function for the symbol "robot-pose.distance-to-own-penalty-area" */
00046   double getDistanceToOpponentGoal(); /*!< A function for the symbol "robot-pose.distance-to-opponent-goal" */
00047   double getDefensiveSupporterRobotPoseY(); /*!< calculates the value for the symbol "defensive-supporter.robot-pose.y" */
00048   double getStrikerRobotPoseY(); /*!< calculates the value for the symbol "striker.robot-pose.y" */
00049   double updateGoalieDefendPosition(); /*!< calculates the values for the symbols "robot-pose.goalie-defend-angle","robot-pose.goalie-defend-pos-x","robot-pose.goalie-defend-pos-y","robot-pose.goalie-defend-step-pos-x","robot-pose.goalie-defend-step-pos-y","robot-pose.goalie-defend-step-angle"*/
00050   double getGoalieDefendAngle(); /*!< returns the Symbol "robot-pose.goalie-defend-angle" */
00051   double getGoalieDefendPosY(); /*!< returns the Symbol "robot-pose.goalie-defend-pos-x" */
00052   double getGoalieDefendPosX(); /*!< returns the Symbol "robot-pose.goalie-defend-pos-y" */
00053   double getGoalieDefendStepPosX(); /*!< returns the Symbol "robot-pose.goalie-defend-step-pos-x" */
00054   double getGoalieDefendStepPosY(); /*!< returns the Symbol "robot-pose.goalie-defend-step-pos-y" */
00055   double getGoalieDefendStepAngle(); /*!< returns the Symbol "robot-pose.goalie-defend-step-angle" */
00056   double calculateSpeedFactorFromRobotPositionStandardDeviation(); /*!< calculates a speed between 0...maxSpeed as a function of the current distribution variance */
00057   double ballPosX; /*!< the Parameter "robot-pose.update-goalie-defend-position.ball-pos-x" for the decimal input function "robot-pose.update-goalie-defend-position" */
00058   double ballPosY; /*!< the Parameter "robot-pose.update-goalie-defend-position.ball-pos-y" for the decimal input function "robot-pose.update-goalie-defend-position" */
00059   void computeGoalieDefendMinPos(const double& alpha, const RobotDimensions& rD); /*!< calculates the values for the variables 'goalieDefendMinPosX','goalieDefendMinPosY','goalieDefendMinAngle' needed for the function 'updateGoalieDefendPosition'*/
00060 
00061   //!@}
00062 private:
00063   void calculateAngles();
00064 
00065   /** The angle that is shown by the top white LEDs */
00066   enum Angles {
00067     angleToCenterOfField,
00068     goalieGoalKickAngle,
00069     bestAngleToOpponentGoal,
00070     bestAngleToOpponentGoalNoObstacles,
00071     angleToPointBehindOpponentGoal,
00072     bestAngleAwayFromOwnGoal,
00073     bestAngleAwayFromOwnGoalNoObstacles,
00074     numberOfAngles
00075   };
00076   
00077   Angles angleShownByLEDs;
00078 
00079   double angles[numberOfAngles];
00080 
00081   double goalieDefendAngle;
00082   double goalieDefendPositionX;
00083   double goalieDefendPositionY;
00084   double goalieDefendStepPosX;
00085   double goalieDefendStepPosY;
00086   double goalieDefendStepAngle;
00087   double goalieDefendRadiusMax;
00088   double goalieDefendRadiusMin;
00089   double goalieDefendMinPosX;
00090   double goalieDefendMinPosY;
00091   double goalieDefendRadius;
00092 };
00093 
00094 
00095 #endif // __RobotPoseSymbols_h_
00096 

Generated on Mon Mar 20 21:59:41 2006 for GT2005 by doxygen 1.3.6