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::detectors
21 {
22 /**
23  *
24  * \sa CPointsMap \ingroup mrpt_slam_grp
25  */
27 {
28  public:
29  /** The constructor. See options for customizing the default parameters.
30  *
31  */
33 
34  /** In this structure parameters can be changed to customize the
35  * behaviour of this algorithm.
36  */
37  struct TOptions
38  {
40  : windowSize(5), gridResolution(0.2f) //, gridUpdateFactor(0.5)
41  {
42  }
43 
44  /** The window size, in (action,observations) pairs;min. value is 2.
45  */
46  unsigned int windowSize;
47 
48  float gridResolution; //,gridUpdateFactor;
49 
50  } options;
51 
52  /** A structure used as output in this method.
53  * \sa process
54  */
56  {
58  : enoughtInformation(false),
60  informationGain(0),
62  pointsMap(){};
63 
64  /** If this is false, all other output fields must not be
65  * taken into account since there is not yet enought information
66  * to fill the required observations window size.
67  */
68  bool enoughtInformation;
69 
70  /** The likelihood of having just entering a new room, in
71  * the range [0,1]
72  */
74 
75  /** The gain in information produced by the last observation, in "bits".
76  */
78 
79  /** The cumulative turning of the robot in radians for the movements in
80  * the "window"
81  */
83 
85  };
86 
87  /** The main method, where a new action/observation pair is added to the
88  * list.
89  * Here the list of old observations is updated, and a value with the
90  * probability
91  * of having pass a door is returned.
92  * \param in_poseChange The odometry (or any other meanway) based change in
93  * the robot pose since last observation to this one.
94  * \param in_sf The observations.
95  * \param out_estimation The estimation results.
96  *
97  * \sa TDoorCrossingOutParams
98  */
99  void process(
100  mrpt::obs::CActionRobotMovement2D& in_poseChange,
102  TDoorCrossingOutParams& out_estimation);
103 
104  /** Reset the detector, i.e. it erases all previous observations.
105  */
106  void clear();
107 
108  private:
109  /** The last observations and consecutive actions are stored here:
110  * Indexes (0,1) is the earlier (act,obs) pair, and the lastest pair
111  * is in indexes ((M-1)*2,(M-1)*2-1).
112  * Always contains (Action, Observation) pairs, in that order.
113  */
115 
116  /** Entropy of current, and last "map patchs". */
119 };
120 
121 }
122 #endif
123 
124 
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.
Versatile class for consistent logging and management of output messages.
struct mrpt::detectors::CDetectorDoorCrossing::TOptions options
This class stores a rawlog (robotic datasets) in one of two possible formats:
Definition: CRawlog.h:66
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:52
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".
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: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020