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-2017, 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  */
28 class CDetectorDoorCrossing : public mrpt::utils::COutputLogger
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
unsigned int windowSize
The window size, in (action,observations) pairs;min.
mrpt::maps::COccupancyGridMap2D::TEntropyInfo entropy
Entropy of current, and last "map patchs".
bool enoughtInformation
If this is false, all other output fields must not be taken into account since there is not yet enoug...
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans. ...
Represents a probabilistic 2D movement of the robot mobile base.
struct mrpt::detectors::CDetectorDoorCrossing::TOptions options
This class stores a rawlog (robotic datasets) in one of two possible formats:
Definition: CRawlog.h:68
In this structure parameters can be changed to customize the behaviour of this algorithm.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
Definition: CSensoryFrame.h:54
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.
float informationGain
The gain in information produced by the last observation, in "bits".
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void clear()
Reset the detector, i.e.
float cumulativeTurning
The cumulative turning of the robot in radians for the movements in the "window". ...
mrpt::obs::CRawlog lastObs
The last observations and consecutive actions are stored here: Indexes (0,1) is the earlier (act...
Used for returning entropy related information.
float doorCrossingLikelihood
The likelihood of having just entering a new room, in the range [0,1].
mrpt::maps::COccupancyGridMap2D::TEntropyInfo lastEntropy



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019