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



Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014