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
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 getAngleToBorder(); /*!< A function for the symbol "robot-pose.angle-to-border" */
00042   double getDistanceToOwnGoal(); /*!< A function for the symbol "robot-pose.distance-to-own-goal" */
00043   double getDistanceToOwnPenaltyArea(); /*!< A function for the symbol "robot-pose.distance-to-own-penalty-area" */
00044   double getDistanceToOpponentGoal(); /*!< A function for the symbol "robot-pose.distance-to-opponent-goal" */
00045   double getDefensiveSupporterRobotPoseY(); /*!< calculates the value for the symbol "defensive-supporter.robot-pose.y" */
00046   double getStrikerRobotPoseY(); /*!< calculates the value for the symbol "striker.robot-pose.y" */
00047   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"*/
00048   double getGoalieDefendAngle(); /*!< returns the Symbol "robot-pose.goalie-defend-angle" */
00049   double getGoalieDefendPosY(); /*!< returns the Symbol "robot-pose.goalie-defend-pos-x" */
00050   double getGoalieDefendPosX(); /*!< returns the Symbol "robot-pose.goalie-defend-pos-y" */
00051   double getGoalieDefendStepPosX(); /*!< returns the Symbol "robot-pose.goalie-defend-step-pos-x" */
00052   double getGoalieDefendStepPosY(); /*!< returns the Symbol "robot-pose.goalie-defend-step-pos-y" */
00053   double getGoalieDefendStepAngle(); /*!< returns the Symbol "robot-pose.goalie-defend-step-angle" */
00054   double ballPosX; /*!< the Parameter "robot-pose.update-goalie-defend-position.ball-pos-x" for the decimal input function "robot-pose.update-goalie-defend-position" */
00055   double ballPosY; /*!< the Parameter "robot-pose.update-goalie-defend-position.ball-pos-y" for the decimal input function "robot-pose.update-goalie-defend-position" */
00056   void computeGoalieDefendMinPos(const double& alpha, const RobotDimensions& rD); /*!< calculates the values for the variables 'goalieDefendMinPosX','goalieDefendMinPosY','goalieDefendMinAngle' needed for the function 'updateGoalieDefendPosition'*/
00057 
00058   //!@}
00059 private:
00060   void calculateAngles();
00061 
00062   /** The angle that is shown by the top white LEDs */
00063   enum Angles {
00064     angleToCenterOfField,
00065     goalieGoalKickAngle,
00066     bestAngleToOpponentGoal,
00067     bestAngleToOpponentGoalNoObstacles,
00068     angleToPointBehindOpponentGoal,
00069     bestAngleAwayFromOwnGoal,
00070     bestAngleAwayFromOwnGoalNoObstacles,
00071     numberOfAngles
00072   };
00073   
00074   Angles angleShownByLEDs;
00075 
00076   double angles[numberOfAngles];
00077 
00078   double goalieDefendAngle;
00079   double goalieDefendPositionX;
00080   double goalieDefendPositionY;
00081   double goalieDefendStepPosX;
00082   double goalieDefendStepPosY;
00083   double goalieDefendStepAngle;
00084   double goalieDefendRadiusMax;
00085   double goalieDefendRadiusMin;
00086   double goalieDefendMinPosX;
00087   double goalieDefendMinPosY;
00088   double goalieDefendRadius;
00089 };
00090 
00091 
00092 #endif // __RobotPoseSymbols_h_
00093 
00094 /*
00095 * Change Log
00096 * 
00097 * $Log: RobotPoseSymbols.h,v $
00098 * Revision 1.4  2004/06/22 18:48:56  juengel
00099 * kickAngles clean up
00100 *
00101 * Revision 1.3  2004/06/16 23:09:17  juengel
00102 * Added angle-to-center-of-field.
00103 *
00104 * Revision 1.2  2004/06/16 17:07:33  cesarz
00105 * Moved body PSD calculations
00106 *
00107 * Revision 1.1.1.1  2004/05/22 17:17:02  cvsadm
00108 * created new repository GT2004_WM
00109 *
00110 * Revision 1.12  2004/04/08 15:33:01  wachter
00111 * GT04 checkin of Microsoft-Hellounds
00112 *
00113 * Revision 1.11  2004/04/05 17:56:47  loetzsch
00114 * merged the local German Open CVS of the aibo team humboldt with the tamara CVS
00115 *
00116 * Revision 1.2  2004/04/04 01:16:13  jumped
00117 * Added angle-to-point-behind-opponent-goal.
00118 *
00119 * Revision 1.1.1.1  2004/03/31 11:16:42  loetzsch
00120 * created ATH repository for german open 2004
00121 *
00122 * Revision 1.10  2004/03/27 16:16:37  juengel
00123 * Added distanceToBorder and angleToBorder.
00124 *
00125 * Revision 1.9  2004/03/17 16:31:20  kerdels
00126 * added boolean input symbol "robot-pose.something-in-front-of-chest" utilizing the chest distance sensor
00127 *
00128 * Revision 1.8  2004/03/08 00:58:58  roefer
00129 * Interfaces should be const
00130 *
00131 * Revision 1.7  2004/03/01 17:14:03  kerdels
00132 * added robot-pose.distance-to-opponent-goal,
00133 * moved robot-pose.angle-to-teammate1-3 to MSH2004StrategySymbols as fieldpos.angle-to-teammate1-3,
00134 * added fieldpos.distance-to-teammate1-3,
00135 * added DTT-Options newKickToGoal, newKickToClear, newKickToTeammate1-3,
00136 * added DTT-OptionClass newKickToTeammate,
00137 * added kickToPosRating function in DefaultOptionRating
00138 *
00139 * Revision 1.6  2004/02/27 10:45:17  spranger
00140 * moved get-Angle-to-Teammate function and parameter to ATH2004StrategySymbols
00141 *
00142 * Revision 1.5  2004/02/25 13:45:24  spranger
00143 * added function getAngleToTeammate and Xabsl input-function get-angle-to-teammate
00144 *
00145 * Revision 1.4  2004/02/16 00:55:07  rempe
00146 * symbols for new goalie
00147 *
00148 * Revision 1.3  2004/01/27 14:28:14  lohmann
00149 * getPenaltyPointAngle added (for bananaCross)
00150 *
00151 * Revision 1.2  2004/01/07 23:17:01  kerdels
00152 * added symbols:
00153 * robot-pose.angle-to-teammate1
00154 * robot-pose.angle-to-teammate2
00155 * robot-pose.angle-to-teammate3
00156 *
00157 * Revision 1.1  2003/10/22 22:18:44  loetzsch
00158 * prepared the cloning of the GT2003BehaviorControl
00159 *
00160 * Revision 1.1  2003/10/06 13:39:29  cvsadm
00161 * Created GT2004 (M.J.)
00162 *
00163 * Revision 1.3  2003/07/05 23:57:09  juengel
00164 * Added best-angle-away-from-own-goal and best-angle-away-from-own-goal-no-obstacles.
00165 *
00166 * Revision 1.2  2003/07/04 12:25:28  juengel
00167 * Added bestAngleToOpponentGoalNoObstacles.
00168 *
00169 * Revision 1.1.1.1  2003/07/02 09:40:23  cvsadm
00170 * created new repository for the competitions in Padova from the 
00171 * tamara CVS (Tuesday 2:00 pm)
00172 *
00173 * removed unused solutions
00174 *
00175 * Revision 1.9  2003/06/19 19:51:07  juengel
00176 * Obstacles are used to determine bestAngleToOpponentGoal.
00177 *
00178 * Revision 1.8  2003/06/19 12:11:17  juengel
00179 * Changed calculation of goal-kick-angle.
00180 *
00181 * Revision 1.7  2003/06/18 13:47:36  loetzsch
00182 * added input symbol "goalie.kick-when-stuck"
00183 *
00184 * Revision 1.6  2003/06/18 09:12:47  loetzsch
00185 * added symbol "striker.robot-pose.y"
00186 *
00187 * Revision 1.5  2003/06/17 18:28:45  thomas
00188 * added: goalie cont-behaviours, return-state, etc.
00189 *
00190 * Revision 1.4  2003/06/16 20:01:23  loetzsch
00191 * added "defensive-supporter.robot-pose.y"
00192 *
00193 * Revision 1.3  2003/06/05 18:10:02  juengel
00194 * Added angle-to-next-free-teammate.
00195 *
00196 * Revision 1.2  2003/05/26 13:06:46  juengel
00197 * Moved angleToFreePartOfGoal from specialPercept to obstaclesPercept.
00198 *
00199 * Revision 1.1  2003/05/06 16:03:05  loetzsch
00200 * added class RobotPoseSymbols
00201 *
00202 */
00203 

Generated on Thu Sep 23 19:57:25 2004 for GT2004 by doxygen 1.3.6