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



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST