Main MRPT website > C++ reference for MRPT 1.4.0
CLogFileRecord.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #ifndef CLogFileRecord_H
10 #define CLogFileRecord_H
11 
13 #include <mrpt/poses/CPose2D.h>
15 
18 
19 namespace mrpt
20 {
21 namespace nav
22 {
24 
25  /** A class for storing, saving and loading a reactive navigation
26  * log record for the CReactiveNavigationSystem class.
27  * \sa CReactiveNavigationSystem, CHolonomicLogFileRecord
28  * \ingroup nav_reactive
29  */
30  class NAV_IMPEXP CLogFileRecord : public mrpt::utils::CSerializable
31  {
33 
34  public:
35  CLogFileRecord(); //!< Constructor, builds an empty record.
36  virtual ~CLogFileRecord(); //!< Destructor, free all objects.
37 
38  void operator =( CLogFileRecord &); //!< Copy .
39 
40  /** The structure used to store all relevant information about each
41  * transformation into TP-Space.
42  * \ingroup nav_reactive
43  */
44  struct TInfoPerPTG
45  {
46  std::string PTG_desc; //!< A short description for the applied PTG
47  mrpt::math::CVectorFloat TP_Obstacles; //!< Distances until obstacles, in "pseudometers", first index for -PI direction, last one for PI direction.
48  mrpt::math::TPoint2D TP_Target; //!< Target location in TP-Space
49  float timeForTPObsTransformation,timeForHolonomicMethod; //!< Time, in seconds.
50  float desiredDirection,desiredSpeed, evaluation; //!< The results from the holonomic method.
51  mrpt::math::CVectorFloat evalFactors; //!< Evaluation factors
52  CHolonomicLogFileRecordPtr HLFR; //!< Other useful info about holonomic method execution.
53 
54  /** This will point to a CPTG_Dummy object with trajectory data, but only for the FIRST entry in a log file to save wasted space.*/
56  };
57 
58  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)
59  uint32_t nPTGs; //!< The number of PTGS:
60 
61  /** The info for each applied PTG: must contain "nPTGs * nSecDistances" elements
62  */
63  std::vector<TInfoPerPTG, Eigen::aligned_allocator<TInfoPerPTG> > infoPerPTG;
64 
65  int32_t nSelectedPTG; //!< The selected PTG.
66  float executionTime; //!< The total computation time, excluding sensing.
67  float estimatedExecutionPeriod; //!< The estimated execution period.
69  mrpt::poses::CPose2D robotOdometryPose; //!< The robot pose (from raw odometry or a localization system).
70  mrpt::math::TPoint2D WS_target_relative; //!< The relative location of target point in WS.
71 
72  float v,w; //!< The final motion command sent to robot, in "m/sec" and "rad/sec".
73  float actual_v,actual_w; //!< The actual robot velocities, as read from sensors, in "m/sec" and "rad/sec".
74  mrpt::math::CVectorFloat robotShape_x,robotShape_y; //!< The used robot shape in WS.
75  int32_t navigatorBehavior; //!< The navigator behavior.
76 
77  private:
78  /** Free all objects in infoPerPTGs structures (used internally).
79  */
80  void freeInfoPerPTGs();
81 
82 
83  };
85 
86 }
87 }
88 
89 
90 #endif
91 
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
Definition: datetime.h:30
int32_t nSelectedPTG
The selected PTG.
float actual_w
The actual robot velocities, as read from sensors, in "m/sec" and "rad/sec".
mrpt::math::CVectorFloat robotShape_y
The used robot shape in WS.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:39
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans. ...
std::vector< TInfoPerPTG, Eigen::aligned_allocator< TInfoPerPTG > > infoPerPTG
The info for each applied PTG: must contain "nPTGs * nSecDistances" elements.
uint32_t nPTGs
The number of PTGS:
A class for storing, saving and loading a reactive navigation log record for the CReactiveNavigationS...
mrpt::system::TTimeStamp timestamp
The timestamp of when this log was processed by the reactive algorithm (It can be INVALID_TIMESTAMP f...
CHolonomicLogFileRecordPtr HLFR
Other useful info about holonomic method execution.
mrpt::math::TPoint2D TP_Target
Target location in TP-Space.
mrpt::math::CVectorFloat evalFactors
Evaluation factors.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
float estimatedExecutionPeriod
The estimated execution period.
float evaluation
The results from the holonomic method.
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction...
Definition: eigen_frwds.h:35
int32_t navigatorBehavior
The navigator behavior.
std::string PTG_desc
A short description for the applied PTG.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
mrpt::math::CVectorFloat TP_Obstacles
Distances until obstacles, in "pseudometers", first index for -PI direction, last one for PI directio...
A class used to store a 2D pose.
Definition: CPose2D.h:36
mrpt::math::TPoint2D WS_target_relative
The relative location of target point in WS.
mrpt::poses::CPose2D robotOdometryPose
The robot pose (from raw odometry or a localization system).
float executionTime
The total computation time, excluding sensing.
mrpt::maps::CSimplePointsMap WS_Obstacles
The WS-Obstacles.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
Lightweight 2D point.
float w
The final motion command sent to robot, in "m/sec" and "rad/sec".
mrpt::nav::CParameterizedTrajectoryGeneratorPtr ptg_trajectory
This will point to a CPTG_Dummy object with trajectory data, but only for the FIRST entry in a log fi...
The structure used to store all relevant information about each transformation into TP-Space...



Page generated by Doxygen 1.8.8 for MRPT 1.4.0 SVN: at Sun Mar 12 00:47:13 UTC 2023