Main MRPT website > C++ reference for MRPT 1.4.0
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-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 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 
21 
22 namespace mrpt
23 {
24 namespace detectors
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  mrpt::obs::CActionRobotMovement2D & in_poseChange,
104  mrpt::obs::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". */
123 
124 
125 
126  };
127 
128  } // End of namespace
129 } // End of namespace
130 
131 #endif
mrpt::obs::CRawlog
This class stores a rawlog (robotic datasets) in one of two possible formats:
Definition: obs/CRawlog.h:52
mrpt::utils::CDebugOutputCapable
This base class provides a common printf-like method to send debug information to std::cout,...
Definition: CDebugOutputCapable.h:31
CDebugOutputCapable.h
mrpt::detectors::CDetectorDoorCrossing
Definition: CDetectorDoorCrossing.h:31
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::TDoorCrossingOutParams
TDoorCrossingOutParams()
Definition: CDetectorDoorCrossing.h:62
mrpt::detectors::CDetectorDoorCrossing::lastEntropy
mrpt::maps::COccupancyGridMap2D::TEntropyInfo lastEntropy
Definition: CDetectorDoorCrossing.h:121
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams
A structure used as output in this method.
Definition: CDetectorDoorCrossing.h:60
mrpt::detectors::CDetectorDoorCrossing::TOptions::gridResolution
float gridResolution
Definition: CDetectorDoorCrossing.h:52
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CParticleFilter.h:16
mrpt::obs::CActionRobotMovement2D
Represents a probabilistic 2D movement of the robot mobile base.
Definition: obs/CActionRobotMovement2D.h:29
CPose2D.h
mrpt::detectors::CDetectorDoorCrossing::TOptions
In this structure parameters can be changed to customize the behaviour of this algorithm.
Definition: CDetectorDoorCrossing.h:42
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:118
mrpt::obs::CSensoryFrame
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
Definition: obs/CSensoryFrame.h:52
CSensoryFrame.h
COccupancyGridMap2D.h
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::informationGain
float informationGain
The gain in information produced by the last observation, in "bits".
Definition: CDetectorDoorCrossing.h:84
mrpt::maps::CSimplePointsMap
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans.
Definition: maps/CSimplePointsMap.h:33
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::pointsMap
mrpt::maps::CSimplePointsMap pointsMap
Definition: CDetectorDoorCrossing.h:90
CSimplePointsMap.h
mrpt::maps::COccupancyGridMap2D::TEntropyInfo
Used for returning entropy related information.
Definition: maps/COccupancyGridMap2D.h:328
CRawlog.h
mrpt::detectors::CDetectorDoorCrossing::TOptions::TOptions
TOptions()
Definition: CDetectorDoorCrossing.h:44
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::cumulativeTurning
float cumulativeTurning
The cumulative turning of the robot in radians for the movements in the "window".
Definition: CDetectorDoorCrossing.h:88
mrpt::detectors::CDetectorDoorCrossing::TDoorCrossingOutParams::doorCrossingLikelihood
float doorCrossingLikelihood
The likelihood of having just entering a new room, in the range [0,1].
Definition: CDetectorDoorCrossing.h:80
CActionRobotMovement2D.h
mrpt::detectors::CDetectorDoorCrossing::lastEntropyValid
bool lastEntropyValid
Definition: CDetectorDoorCrossing.h:122
mrpt::detectors::CDetectorDoorCrossing::TOptions::windowSize
unsigned int windowSize
The window size, in (action,observations) pairs;min.
Definition: CDetectorDoorCrossing.h:50



Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 23:08:25 UTC 2019