Main MRPT website > C++ reference for MRPT 1.5.9
CRangeScanOps.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 
10 #ifndef CRANGESCANOPS_H
11 #define CRANGESCANOPS_H
12 
17 #include <mrpt/utils/CStream.h>
19 #include <mrpt/maps/CPointsMap.h>
20 #include <mrpt/poses/CPosePDF.h>
21 #include <mrpt/poses/CPose3DPDF.h>
22 #include <mrpt/poses/CPose2D.h>
23 #include <mrpt/poses/CPose3D.h>
24 #include <mrpt/slam/CICP.h>
25 #include <mrpt/system/os.h>
26 
27 #include <iostream>
28 #include <vector>
29 
30 namespace mrpt { namespace graphslam { namespace deciders {
31 
32 /**\brief Class for keeping together all the RangeScanner-related functions.
33  *
34  * ## Description
35  *
36  * Deciders that make use of either 2DRangeScans (laser generated
37  * observations) or 3DRangeScans (RGBD-cameras) can inherit from
38  * this class in case they want to use the underlying methods
39  *
40  * ### .ini Configuration Parameters
41  *
42  * \htmlinclude graphslam-engine_config_params_preamble.txt
43  *
44  * - \b conversion_sensor_label
45  * + \a Default value : "KINECT_TO_2D_SCAN"
46  * + \a Required : FALSE
47  * + \a Description : Applicable only when dealing with 3DRangeScans.
48  * Used for converting 3DRangeScan to 2DRangesScan so that they are
49  * visualized on the 2D surface
50  *
51  * - \b conversion_angle_sup
52  * + \a Default value : 10
53  * + \a Required : FALSE
54  * + \a Description : Applicable only when dealing with 3DRangeScans.
55  * Used for converting 3DRangeScan to 2DRangesScan so that they are
56  * visualized on the 2D surface
57  *
58  * - \b conversion_angle_inf
59  * + \a Default value : 10
60  * + \a Required : FALSE
61  * + \a Description : Applicable only when dealing with 3DRangeScans.
62  * Used for converting 3DRangeScan to 2DRangesScan so that they are
63  * visualized on the 2D surface
64  *
65  * - \b conversion_oversampling_ratio
66  * + \a Default value : 1.1
67  * + \a Required : FALSE
68  * + \a Description : Applicable only when dealing with 3DRangeScans.
69  * Used for converting 3DRangeScan to 2DRangesScan so that they are
70  * visualized on the 2D surface
71  *
72  * \note Class contains an instance of the mrpt::slam::CICP class and it parses
73  * the configuration parameters of the latter from the
74  * "ICP" section. Refer to
75  * mrpt::slam::CICP documentation for its list of
76  * configuration parameters
77  *
78  * \ingroup mrpt_graphslam_grp
79  */
80 template<class GRAPH_T=typename mrpt::graphs::CNetworkOfPoses2DInf>
82  /**\brief Handy typedefs */
83  /**\{*/
84  typedef typename GRAPH_T::constraint_t constraint_t;
86  /**\}*/
87 
88  protected:
89  // Protected methods
90  // ////////////////////////////////////////////////////////////
91 
92  /**\brief Align the 2D range scans provided and fill the potential edge that
93  * can transform the one into the other.
94  *
95  * User can optionally ask that additional information be returned in a
96  * TReturnInfo struct
97  */
98  void getICPEdge(
101  constraint_t* rel_edge,
102  const mrpt::poses::CPose2D* initial_pose=NULL,
103  mrpt::slam::CICP::TReturnInfo* icp_info=NULL);
104  /**\brief Align the 3D range scans provided and find the potential edge that
105  * can transform the one into the other.
106  *
107  * Fills the 2D part (rel_edge) of the 3D constraint between the scans, since
108  * we are interested in computing the 2D alignment. User can optionally ask
109  * that additional information be returned in a TReturnInfo struct
110  */
111  void getICPEdge(
114  constraint_t* rel_edge,
115  const mrpt::poses::CPose2D* initial_pose=NULL,
116  mrpt::slam::CICP::TReturnInfo* icp_info=NULL);
117  /**\brief Reduce the size of the given CPointsMap by keeping one out of
118  * "keep_point_every" points.
119  *
120  * \note If low_lim is set then the PointsMap will contain at least low_lim
121  * measurements, regardless of keep_point_every value. Set low_lim to 0 if no
122  * lower limit is to be specified
123  */
125  size_t keep_point_every=4,
126  size_t low_lim=0);
127  /**\brief Wrapper around the CObservation3DRangeScan::convertTo2DScan
128  * corresponding method
129  *
130  * \return True if operation was successful, false otherwise
131  */
133  /*from = */ mrpt::obs::CObservation3DRangeScanPtr& scan3D_in,
134  /*to = */ mrpt::obs::CObservation2DRangeScanPtr* scan2D_out=NULL);
135 
137  public:
138  TParams();
139  ~TParams();
140 
141  void loadFromConfigFile(
143  const std::string &section);
144  void dumpToTextStream(mrpt::utils::CStream &out) const;
145 
147 
148  /**\brief Struct holding the parameters of 3D to the corresponding 2D
149  * range scan conversion.
150  */
152 
154  };
156 
157 };
158 
159 } } } // end of namespaces
160 
161 #include "CRangeScanOps_impl.h"
162 #endif /* end of include guard: CRANGESCANOPS_H */
163 
Several implementations of ICP (Iterative closest point) algorithms for aligning two point maps or a ...
Definition: CICP.h:52
mrpt::obs::T3DPointsTo2DScanParams conversion_params
Struct holding the parameters of 3D to the corresponding 2D range scan conversion.
Declares a class derived from "CObservation" that encapsules a 3D range scan measurement, as from a time-of-flight range camera or any other RGBD sensor.
void decimatePointsMap(mrpt::maps::CPointsMap *m, size_t keep_point_every=4, size_t low_lim=0)
Reduce the size of the given CPointsMap by keeping one out of "keep_point_every" points.
void dumpToTextStream(mrpt::utils::CStream &out) const
This method should clearly display all the contents of the structure in textual form, sending it to a CStream.
This class allows loading and storing values and vectors of different types from a configuration text...
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string &section)
This method load the options from a ".ini"-like file or memory-stored string list.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
GRAPH_T::constraint_t constraint_t
Handy typedefs.
Definition: CRangeScanOps.h:84
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans or other sensors...
Used in CObservation3DRangeScan::convertTo2DScan()
GLsizei const GLchar ** string
Definition: glext.h:3919
void getICPEdge(const mrpt::obs::CObservation2DRangeScan &from, const mrpt::obs::CObservation2DRangeScan &to, constraint_t *rel_edge, const mrpt::poses::CPose2D *initial_pose=NULL, mrpt::slam::CICP::TReturnInfo *icp_info=NULL)
Align the 2D range scans provided and fill the potential edge that can transform the one into the oth...
Class for keeping together all the RangeScanner-related functions.
Definition: CRangeScanOps.h:81
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
Definition: CPose2D.h:36
The ICP algorithm return information.
Definition: CICP.h:128
GLsizei GLsizei GLchar * source
Definition: glext.h:3908
bool convert3DTo2DRangeScan(mrpt::obs::CObservation3DRangeScanPtr &scan3D_in, mrpt::obs::CObservation2DRangeScanPtr *scan2D_out=NULL)
Wrapper around the CObservation3DRangeScan::convertTo2DScan corresponding method. ...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020