MRPT  2.0.1
CDetectorDoorCrossing.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
14 #include <mrpt/obs/CRawlog.h>
15 #include <mrpt/obs/CSensoryFrame.h>
16 #include <mrpt/poses/CPose2D.h>
18 
19 namespace mrpt::detectors
20 {
21 /**
22  *
23  * \sa CPointsMap \ingroup mrpt_slam_grp
24  */
26 {
27  public:
28  /** The constructor. See options for customizing the default parameters.
29  */
31 
32  /** In this structure parameters can be changed to customize the
33  * behaviour of this algorithm.
34  */
35  struct TOptions
36  {
37  TOptions() = default;
38  /** The window size, in (action,observations) pairs;min. value is 2.
39  */
40  unsigned int windowSize{5};
41  float gridResolution{0.2f};
42  } options;
43 
44  /** A structure used as output in this method.
45  * \sa process
46  */
48  {
49  TDoorCrossingOutParams() = default;
50 
51  /** If this is false, all other output fields must not be
52  * taken into account since there is not yet enough information
53  * to fill the required observations window size.
54  */
55  bool enoughInformation{false};
56 
57  /** The likelihood of having just entering a new room, in
58  * the range [0,1]
59  */
61 
62  /** The gain in information produced by the last observation, in "bits".
63  */
64  float informationGain{0};
65 
66  /** The cumulative turning of the robot in radians for the movements in
67  * the "window"
68  */
70 
72  };
73 
74  /** The main method, where a new action/observation pair is added to the
75  * list.
76  * Here the list of old observations is updated, and a value with the
77  * probability
78  * of having pass a door is returned.
79  * \param in_poseChange The odometry (or any other meanway) based change in
80  * the robot pose since last observation to this one.
81  * \param in_sf The observations.
82  * \param out_estimation The estimation results.
83  *
84  * \sa TDoorCrossingOutParams
85  */
86  void process(
87  mrpt::obs::CActionRobotMovement2D& in_poseChange,
89  TDoorCrossingOutParams& out_estimation);
90 
91  /** Reset the detector, i.e. it erases all previous observations.
92  */
93  void clear();
94 
95  private:
96  /** The last observations and consecutive actions are stored here:
97  * Indexes (0,1) is the earlier (act,obs) pair, and the lastest pair
98  * is in indexes ((M-1)*2,(M-1)*2-1).
99  * Always contains (Action, Observation) pairs, in that order.
100  */
102 
103  /** Entropy of current, and last "map patchs". */
105  bool lastEntropyValid{false};
106 };
107 
108 } // namespace mrpt::detectors
unsigned int windowSize
The window size, in (action,observations) pairs;min.
mrpt::maps::COccupancyGridMap2D::TEntropyInfo entropy
Entropy of current, and last "map patchs".
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans. ...
bool enoughInformation
If this is false, all other output fields must not be taken into account since there is not yet enoug...
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:65
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:51
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 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020