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

Tools/Evolution/Parcour.h

Go to the documentation of this file.
00001 /**
00002 * @file Parcour.h
00003 *
00004 * Declaration of class Parcour, ForwardTurningParcour, SimpleBackwardParcour
00005 *
00006 * @author <a href=mailto:dueffert@informatik.hu-berlin.de>Uwe Düffert</a>
00007 */
00008 
00009 #ifndef __Parcour_h_
00010 #define __Parcour_h_
00011 
00012 #include "Tools/Math/Pose2D.h"
00013 #include "Tools/Math/Vector3.h"
00014 
00015 /**
00016 * @class Parcour
00017 *
00018 * Contains a walking parcour with all relevant data to calculate next useful MotionRequest, resulting fitness, ...
00019 */
00020 class Parcour
00021 {
00022 public:
00023   /** Constructor. */
00024   Parcour():updateCount(0),startTime(0),lastTime(0),lastRobotPose(0,0,0),minX(-1000),maxX(-1000),yDiffIntegral(0),arcDiffIntegral(0),blindCount(0),zAccelIntegral(0) {}
00025   
00026   /** Destructor. */
00027   ~Parcour() {}
00028 
00029   /** start walking on the parcour: set start time, reset fitness stuff */
00030   void start();
00031 
00032   /** update the state of the parcour with all current data */
00033   void update(Pose2D robotPose, Vector3<double> accel, bool blind);
00034 
00035   /** return a MotionRequest that is useful at the moment to follow the parcour */
00036   Pose2D getMotionRequest();
00037 
00038   /** return something like speed in mm/s considering a useful portion of the integral errors */
00039   double getUnifiedSpeed();
00040 
00041   unsigned long updateCount;
00042 
00043 //protected:
00044   virtual Pose2D getTargetPose(unsigned long targetTime) = 0;
00045 
00046   unsigned long startTime;
00047   unsigned long lastTime;
00048   Pose2D lastRobotPose;
00049   double minX,maxX;
00050   double yDiffIntegral;
00051   double arcDiffIntegral;
00052   int blindCount;
00053   double zAccelIntegral;
00054 };
00055 
00056 /**
00057 * @class ForwardTurningParcour
00058 *
00059 * Contains a special walking parcour
00060 */
00061 class ForwardTurningParcour : public Parcour
00062 {
00063 public:
00064   virtual Pose2D getTargetPose(unsigned long targetTime);
00065 };
00066 
00067 /**
00068 * @class SimpleBackwardParcour
00069 *
00070 * Contains a special walking parcour
00071 */
00072 class SimpleBackwardParcour : public Parcour
00073 {
00074 public:
00075   virtual Pose2D getTargetPose(unsigned long targetTime);
00076 };
00077 
00078 #endif //__Parcour_h_
00079 
00080 /*
00081 * Change log :
00082 *
00083 * $Log: Parcour.h,v $
00084 * Revision 1.1.1.1  2004/05/22 17:36:14  cvsadm
00085 * created new repository GT2004_WM
00086 *
00087 * Revision 1.4  2004/02/10 11:11:20  dueffert
00088 * Parcour improved
00089 *
00090 * Revision 1.3  2004/01/28 08:28:48  dueffert
00091 * Parcour improved
00092 *
00093 * Revision 1.2  2003/11/18 15:46:54  dueffert
00094 * some improvements
00095 *
00096 * Revision 1.1  2003/11/17 17:19:48  dueffert
00097 * new class
00098 *
00099 *
00100 */

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