Main MRPT website > C++ reference for MRPT 1.9.9
CDetectorDoorCrossing.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-2018, 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 CDetectorDoorCrossing_H
10 #define CDetectorDoorCrossing_H
11 
13 #include <mrpt/obs/CRawlog.h>
14 #include <mrpt/poses/CPose2D.h>
15 #include <mrpt/obs/CSensoryFrame.h>
19 
20 namespace mrpt
21 {
22 namespace detectors
23 {
24 /**
25  *
26  * \sa CPointsMap \ingroup mrpt_slam_grp
27  */
29 {
30  public:
31  /** The constructor. See options for customizing the default parameters.
32  *
33  */
35 
36  /** In this structure parameters can be changed to customize the
37  * behaviour of this algorithm.
38  */
39  struct TOptions
40  {
42  : windowSize(5), gridResolution(0.2f) //, gridUpdateFactor(0.5)
43  {
44  }
45 
46  /** The window size, in (action,observations) pairs;min. value is 2.
47  */
48  unsigned int windowSize;
49 
50  float gridResolution; //,gridUpdateFactor;
51 
52  } options;
53 
54  /** A structure used as output in this method.
55  * \sa process
56  */
58  {
60  : enoughtInformation(false),
62  informationGain(0),
64  pointsMap(){};
65 
66  /** If this is false, all other output fields must not be
67  * taken into account since there is not yet enought information
68  * to fill the required observations window size.
69  */
70  bool enoughtInformation;
71 
72  /** The likelihood of having just entering a new room, in
73  * the range [0,1]
74  */
76 
77  /** The gain in information produced by the last observation, in "bits".
78  */
80 
81  /** The cumulative turning of the robot in radians for the movements in
82  * the "window"
83  */
85 
87  };
88 
89  /** The main method, where a new action/observation pair is added to the
90  * list.
91  * Here the list of old observations is updated, and a value with the
92  * probability
93  * of having pass a door is returned.
94  * \param in_poseChange The odometry (or any other meanway) based change in
95  * the robot pose since last observation to this one.
96  * \param in_sf The observations.
97  * \param out_estimation The estimation results.
98  *
99  * \sa TDoorCrossingOutParams
100  */
101  void process(
102  mrpt::obs::CActionRobotMovement2D& in_poseChange,
104  TDoorCrossingOutParams& out_estimation);
105 
106  /** Reset the detector, i.e. it erases all previous observations.
107  */
108  void clear();
109 
110  private:
111  /** The last observations and consecutive actions are stored here:
112  * Indexes (0,1) is the earlier (act,obs) pair, and the lastest pair
113  * is in indexes ((M-1)*2,(M-1)*2-1).
114  * Always contains (Action, Observation) pairs, in that order.
115  */
117 
118  /** Entropy of current, and last "map patchs". */
121 };
122 
123 } // End of namespace
124 } // End of namespace
125 
126 #endif
mrpt::obs::CRawlog
This class stores a rawlog (robotic datasets) in one of two possible formats:
Definition: CRawlog.h:68
COccupancyGridMap2D.h
mrpt::detectors::CDetectorDoorCrossing
Definition: CDetectorDoorCrossing.h:28
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::TDoorCrossingOutParams
TDoorCrossingOutParams()
Definition: CDetectorDoorCrossing.h:59
mrpt::detectors::CDetectorDoorCrossing::process
void process(mrpt::obs::CActionRobotMovement2D &in_poseChange, mrpt::obs::CSensoryFrame &in_sf, TDoorCrossingOutParams &out_estimation)
The main method, where a new action/observation pair is added to the list.
Definition: CDetectorDoorCrossing.cpp:48
mrpt::detectors::CDetectorDoorCrossing::lastEntropy
mrpt::maps::COccupancyGridMap2D::TEntropyInfo lastEntropy
Definition: CDetectorDoorCrossing.h:119
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams
A structure used as output in this method.
Definition: CDetectorDoorCrossing.h:57
mrpt::detectors::CDetectorDoorCrossing::TOptions::gridResolution
float gridResolution
Definition: CDetectorDoorCrossing.h:50
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::obs::CActionRobotMovement2D
Represents a probabilistic 2D movement of the robot mobile base.
Definition: CActionRobotMovement2D.h:32
CPose2D.h
mrpt::detectors::CDetectorDoorCrossing::TOptions
In this structure parameters can be changed to customize the behaviour of this algorithm.
Definition: CDetectorDoorCrossing.h:39
mrpt::detectors::CDetectorDoorCrossing::CDetectorDoorCrossing
CDetectorDoorCrossing()
The constructor.
Definition: CDetectorDoorCrossing.cpp:25
mrpt::detectors::CDetectorDoorCrossing::lastObs
mrpt::obs::CRawlog lastObs
The last observations and consecutive actions are stored here: Indexes (0,1) is the earlier (act,...
Definition: CDetectorDoorCrossing.h:116
mrpt::obs::CSensoryFrame
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
Definition: CSensoryFrame.h:54
CActionRobotMovement2D.h
COutputLogger.h
mrpt::detectors::CDetectorDoorCrossing::clear
void clear()
Reset the detector, i.e.
Definition: CDetectorDoorCrossing.cpp:39
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::informationGain
float informationGain
The gain in information produced by the last observation, in "bits".
Definition: CDetectorDoorCrossing.h:79
mrpt::detectors::CDetectorDoorCrossing::options
struct mrpt::detectors::CDetectorDoorCrossing::TOptions options
mrpt::detectors::CDetectorDoorCrossing::entropy
mrpt::maps::COccupancyGridMap2D::TEntropyInfo entropy
Entropy of current, and last "map patchs".
Definition: CDetectorDoorCrossing.h:119
mrpt::maps::CSimplePointsMap
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans.
Definition: CSimplePointsMap.h:31
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::pointsMap
mrpt::maps::CSimplePointsMap pointsMap
Definition: CDetectorDoorCrossing.h:86
mrpt::system::COutputLogger
Versatile class for consistent logging and management of output messages.
Definition: system/COutputLogger.h:117
mrpt::maps::COccupancyGridMap2D::TEntropyInfo
Used for returning entropy related information.
Definition: COccupancyGridMap2D.h:463
CSensoryFrame.h
mrpt::detectors::CDetectorDoorCrossing::TOptions::TOptions
TOptions()
Definition: CDetectorDoorCrossing.h:41
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::cumulativeTurning
float cumulativeTurning
The cumulative turning of the robot in radians for the movements in the "window".
Definition: CDetectorDoorCrossing.h:84
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::doorCrossingLikelihood
float doorCrossingLikelihood
The likelihood of having just entering a new room, in the range [0,1].
Definition: CDetectorDoorCrossing.h:75
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::enoughtInformation
bool enoughtInformation
If this is false, all other output fields must not be taken into account since there is not yet enoug...
Definition: CDetectorDoorCrossing.h:64
CSimplePointsMap.h
mrpt::detectors::CDetectorDoorCrossing::lastEntropyValid
bool lastEntropyValid
Definition: CDetectorDoorCrossing.h:120
CRawlog.h
mrpt::detectors::CDetectorDoorCrossing::TOptions::windowSize
unsigned int windowSize
The window size, in (action,observations) pairs;min.
Definition: CDetectorDoorCrossing.h:48



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST