Main MRPT website > C++ reference
MRPT logo

CLogFileRecord.h

Go to the documentation of this file.
00001 /* +---------------------------------------------------------------------------+
00002    |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |
00003    |                                                                           |
00004    |                   http://mrpt.sourceforge.net/                            |
00005    |                                                                           |
00006    |   Copyright (C) 2005-2011  University of Malaga                           |
00007    |                                                                           |
00008    |    This software was written by the Machine Perception and Intelligent    |
00009    |      Robotics Lab, University of Malaga (Spain).                          |
00010    |    Contact: Jose-Luis Blanco  <jlblanco@ctima.uma.es>                     |
00011    |                                                                           |
00012    |  This file is part of the MRPT project.                                   |
00013    |                                                                           |
00014    |     MRPT is free software: you can redistribute it and/or modify          |
00015    |     it under the terms of the GNU General Public License as published by  |
00016    |     the Free Software Foundation, either version 3 of the License, or     |
00017    |     (at your option) any later version.                                   |
00018    |                                                                           |
00019    |   MRPT is distributed in the hope that it will be useful,                 |
00020    |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |
00021    |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |
00022    |     GNU General Public License for more details.                          |
00023    |                                                                           |
00024    |     You should have received a copy of the GNU General Public License     |
00025    |     along with MRPT.  If not, see <http://www.gnu.org/licenses/>.         |
00026    |                                                                           |
00027    +---------------------------------------------------------------------------+ */
00028 #ifndef CLogFileRecord_H
00029 #define CLogFileRecord_H
00030 
00031 #include <mrpt/utils/CSerializable.h>
00032 #include <mrpt/slam/CSimplePointsMap.h>
00033 
00034 #include "CHolonomicLogFileRecord.h"
00035 
00036 
00037 namespace mrpt
00038 {
00039   namespace reactivenav
00040   {
00041           using namespace mrpt::utils;
00042 
00043           DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CLogFileRecord, mrpt::utils::CSerializable, REACTIVENAV_IMPEXP )
00044 
00045         /** A class for storing, saving and loading a reactive navigation
00046          *   log record for the CReactiveNavigationSystem class.
00047          * \sa CReactiveNavigationSystem, CHolonomicLogFileRecord
00048          */
00049         class REACTIVENAV_IMPEXP  CLogFileRecord : public CSerializable
00050         {
00051                 DEFINE_SERIALIZABLE( CLogFileRecord )
00052 
00053 
00054          public:
00055                  /** Constructor, builds an empty record.
00056                    */
00057                  CLogFileRecord();
00058 
00059                  /** Copy .
00060                    */
00061                  void operator =( CLogFileRecord &);
00062 
00063                  /** Destructor, free all objects.
00064                    */
00065                  virtual ~CLogFileRecord();
00066 
00067                  /** The structure used to store all relevant information about each
00068                    *  transformation into TP-Space.
00069                    */
00070                  struct TInfoPerPTG
00071                  {
00072                          /** A short description for the applied PTG
00073                            */
00074                          std::string                            PTG_desc;
00075 
00076                          /** Distances until obstacles, in "pseudometers", first index for -PI direction, last one for PI direction.
00077                            */
00078                          vector_float                           TP_Obstacles;
00079 
00080                          /** Target location in TP-Space
00081                            */
00082                          mrpt::poses::CPoint2D                          TP_Target;
00083 
00084                          /** Time, in seconds.
00085                            */
00086                          float                                          timeForTPObsTransformation,timeForHolonomicMethod;
00087 
00088                          /** The results from the holonomic method.
00089                            */
00090                          float                                          desiredDirection,desiredSpeed, evaluation;
00091 
00092                          /** Evaluation factors
00093                            */
00094                          vector_float                           evalFactors;
00095 
00096                          /** Other useful info about holonomic method execution.
00097                            */
00098                          CHolonomicLogFileRecordPtr     HLFR;
00099                  };
00100 
00101                  /** The number of PTGS:
00102                    */
00103                 uint32_t nPTGs;
00104 
00105                 /** The security distances:
00106                  */
00107                 vector_float                            securityDistances;
00108 
00109                  /** The info for each applied PTG: must contain "nPTGs·nSecDistances" elements
00110                    */
00111                  std::vector<TInfoPerPTG, Eigen::aligned_allocator<TInfoPerPTG> >       infoPerPTG;
00112 
00113                  /**  The selected PTG.
00114                    */
00115                  int32_t                                        nSelectedPTG;
00116 
00117                  /** The total computation time, excluding sensing.
00118                    */
00119                  float                                          executionTime;
00120 
00121                  /** The estimated execution period.
00122                    */
00123                  float                                          estimatedExecutionPeriod;
00124 
00125                  /** The WS-Obstacles
00126                    */
00127                  mrpt::slam::CSimplePointsMap           WS_Obstacles;
00128 
00129                  /** The raw odometry measurement.
00130                    */
00131                  mrpt::poses::CPose2D                           robotOdometryPose;
00132 
00133                  /** The relative location of target point in WS.
00134                    */
00135                  mrpt::poses::CPoint2D                          WS_target_relative;
00136 
00137                  /** The final motion command sent to robot, in "m/sec" and "rad/sec".
00138                    */
00139                  float                                          v,w;
00140 
00141                  /** The actual robot velocities, as read from sensors, in "m/sec" and "rad/sec".
00142                    */
00143                  float                                          actual_v,actual_w;
00144 
00145                  /** Some recent values from previous iterations:
00146                    */
00147                  vector_float                           prevV,prevW,prevSelPTG;
00148 
00149                  /** The used robot shape in WS.
00150                    */
00151                  vector_float                           robotShape_x,robotShape_y;
00152 
00153                  /** The navigator behavior.
00154                    */
00155                  int32_t                                        navigatorBehavior;
00156 
00157                  /** The segment of the door-crossing behaviors, when applicable, in relative coordinates.
00158                    */
00159                  mrpt::poses::CPoint2D                          doorCrossing_P1,doorCrossing_P2;
00160 
00161          private:
00162                  /** Free all objects in infoPerPTGs structures (used internally).
00163                    */
00164                 void  freeInfoPerPTGs();
00165 
00166 
00167         };
00168 
00169   }
00170 }
00171 
00172 
00173 #endif
00174 



Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011