Main MRPT website > C++ reference
MRPT logo
CLogFileRecord.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | The Mobile Robot Programming Toolkit (MRPT) C++ library |
3  | |
4  | http://www.mrpt.org/ |
5  | |
6  | Copyright (C) 2005-2012 University of Malaga |
7  | |
8  | This software was written by the Machine Perception and Intelligent |
9  | Robotics Lab, University of Malaga (Spain). |
10  | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11  | |
12  | This file is part of the MRPT project. |
13  | |
14  | MRPT is free software: you can redistribute it and/or modify |
15  | it under the terms of the GNU General Public License as published by |
16  | the Free Software Foundation, either version 3 of the License, or |
17  | (at your option) any later version. |
18  | |
19  | MRPT is distributed in the hope that it will be useful, |
20  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
21  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22  | GNU General Public License for more details. |
23  | |
24  | You should have received a copy of the GNU General Public License |
25  | along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26  | |
27  +---------------------------------------------------------------------------+ */
28 #ifndef CLogFileRecord_H
29 #define CLogFileRecord_H
30 
33 
35 
36 
37 namespace mrpt
38 {
39  namespace reactivenav
40  {
41  using namespace mrpt::utils;
42 
44 
45  /** A class for storing, saving and loading a reactive navigation
46  * log record for the CReactiveNavigationSystem class.
47  * \sa CReactiveNavigationSystem, CHolonomicLogFileRecord
48  * \ingroup mrpt_reactivenav_grp
49  */
51  {
53 
54  public:
55  CLogFileRecord(); //!< Constructor, builds an empty record.
56  virtual ~CLogFileRecord(); //!< Destructor, free all objects.
57 
58  void operator =( CLogFileRecord &); //!< Copy .
59 
60  /** The structure used to store all relevant information about each
61  * transformation into TP-Space.
62  * \ingroup mrpt_reactivenav_grp
63  */
64  struct TInfoPerPTG
65  {
66  std::string PTG_desc; //!< A short description for the applied PTG
67  vector_float TP_Obstacles; //!< Distances until obstacles, in "pseudometers", first index for -PI direction, last one for PI direction.
68  mrpt::poses::CPoint2D TP_Target; //!< Target location in TP-Space
69  float timeForTPObsTransformation,timeForHolonomicMethod; //!< Time, in seconds.
70  float desiredDirection,desiredSpeed, evaluation; //!< The results from the holonomic method.
71  vector_float evalFactors; //!< Evaluation factors
72  CHolonomicLogFileRecordPtr HLFR; //!< Other useful info about holonomic method execution.
73  };
74 
75  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)
76  uint32_t nPTGs; //!< The number of PTGS:
77  vector_float securityDistances; //!< The security distances:
78 
79  /** The info for each applied PTG: must contain "nPTGs·nSecDistances" elements
80  */
81  std::vector<TInfoPerPTG, Eigen::aligned_allocator<TInfoPerPTG> > infoPerPTG;
82 
83  int32_t nSelectedPTG; //!< The selected PTG.
84  float executionTime; //!< The total computation time, excluding sensing.
85  float estimatedExecutionPeriod; //!< The estimated execution period.
87  mrpt::poses::CPose2D robotOdometryPose; //!< The robot pose (from raw odometry or a localization system).
88  mrpt::poses::CPoint2D WS_target_relative; //!< The relative location of target point in WS.
89 
90  float v,w; //!< The final motion command sent to robot, in "m/sec" and "rad/sec".
91  float actual_v,actual_w; //!< The actual robot velocities, as read from sensors, in "m/sec" and "rad/sec".
92  vector_float robotShape_x,robotShape_y; //!< The used robot shape in WS.
93  int32_t navigatorBehavior; //!< The navigator behavior.
94 
95  private:
96  /** Free all objects in infoPerPTGs structures (used internally).
97  */
98  void freeInfoPerPTGs();
99 
100 
101  };
102 
103  }
104 }
105 
106 
107 #endif
108 



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013