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://www.mrpt.org/                                |
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          *  \ingroup mrpt_reactivenav_grp
00049          */
00050         class REACTIVENAV_IMPEXP  CLogFileRecord : public CSerializable
00051         {
00052                 DEFINE_SERIALIZABLE( CLogFileRecord )
00053 
00054         public:
00055         CLogFileRecord();  //!< Constructor, builds an empty record.
00056         virtual ~CLogFileRecord();   //!< Destructor, free all objects.
00057 
00058         void operator =( CLogFileRecord &);  //!< Copy .
00059 
00060         /** The structure used to store all relevant information about each
00061           *  transformation into TP-Space.
00062           *  \ingroup mrpt_reactivenav_grp
00063           */
00064         struct TInfoPerPTG
00065         {
00066             std::string                         PTG_desc;      //!< A short description for the applied PTG
00067             vector_float                                TP_Obstacles;  //!< Distances until obstacles, in "pseudometers", first index for -PI direction, last one for PI direction.
00068             mrpt::poses::CPoint2D               TP_Target;     //!< Target location in TP-Space
00069             float                                               timeForTPObsTransformation,timeForHolonomicMethod;  //!< Time, in seconds.
00070             float                                               desiredDirection,desiredSpeed, evaluation;          //!< The results from the holonomic method.
00071             vector_float                                evalFactors;   //!< Evaluation factors
00072             CHolonomicLogFileRecordPtr  HLFR;          //!< Other useful info about holonomic method execution.
00073         };
00074 
00075         mrpt::system::TTimeStamp   timestamp;  //!< The timestamp of when this log was processed by the reactive algorithm (It can be INVALID_TIMESTAMP for navigation logs in MRPT <0.9.5)
00076                 uint32_t       nPTGs;  //!< The number of PTGS:
00077                 vector_float   securityDistances;  //!< The security distances:
00078 
00079                  /** The info for each applied PTG: must contain "nPTGs·nSecDistances" elements
00080                    */
00081                  std::vector<TInfoPerPTG, Eigen::aligned_allocator<TInfoPerPTG> >       infoPerPTG;
00082 
00083                  int32_t                                        nSelectedPTG;   //!< The selected PTG.
00084                  float                                          executionTime;  //!< The total computation time, excluding sensing.
00085                  float                                          estimatedExecutionPeriod;  //!< The estimated execution period.
00086                  mrpt::slam::CSimplePointsMap  WS_Obstacles;  //!< The WS-Obstacles
00087                  mrpt::poses::CPose2D          robotOdometryPose; //!< The robot pose (from raw odometry or a localization system).
00088                  mrpt::poses::CPoint2D         WS_target_relative;  //!< The relative location of target point in WS.
00089 
00090                  float                                          v,w;  //!< The final motion command sent to robot, in "m/sec" and "rad/sec".
00091                  float                                          actual_v,actual_w; //!< The actual robot velocities, as read from sensors, in "m/sec" and "rad/sec".
00092                  vector_float                           robotShape_x,robotShape_y;  //!< The used robot shape in WS.
00093                  int32_t                                        navigatorBehavior;  //!< The navigator behavior.
00094 
00095          private:
00096                  /** Free all objects in infoPerPTGs structures (used internally).
00097                    */
00098                 void  freeInfoPerPTGs();
00099 
00100 
00101         };
00102 
00103   }
00104 }
00105 
00106 
00107 #endif
00108 



Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011