RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
RegistrationIcp.h
1/*
2Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of the Universite de Sherbrooke nor the
13 names of its contributors may be used to endorse or promote products
14 derived from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28#ifndef REGISTRATIONICP_H_
29#define REGISTRATIONICP_H_
30
31#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
32
33#include <rtabmap/core/Registration.h>
34#include <rtabmap/core/Signature.h>
35
36namespace rtabmap {
37
38// Geometrical registration
39class RTABMAP_CORE_EXPORT RegistrationIcp : public Registration
40{
41public:
43 kIcpUndef = -1,
44 kIcpPCL = 0,
45 kIcpPointMatcher = 1,
46 kIcpCCCoreLib = 2,
47 kIcpEnd = 3
48 };
49
50public:
58 static bool available(IcpStrategy strategy);
59
64 static const char * strategyName(IcpStrategy strategy);
65
66 // take ownership of child
67 RegistrationIcp(const ParametersMap & parameters = ParametersMap(), Registration * child = 0);
68 RegistrationIcp(IcpStrategy strategy, const ParametersMap & parameters = ParametersMap(), Registration * child = 0);
69 virtual ~RegistrationIcp();
70
71 virtual void parseParameters(const ParametersMap & parameters);
72
73protected:
75 Signature & from,
76 Signature & to,
77 Transform guess,
78 RegistrationInfo & info) const;
79 virtual bool isScanRequiredImpl() const {return true;}
80 virtual bool canUseGuessImpl() const {return true;}
81 virtual float getMinGeometryCorrespondencesRatioImpl() const {return _correspondenceRatio;}
82
83private:
84 IcpStrategy _strategy;
85 float _maxTranslation;
86 float _maxRotation;
87 float _voxelSize;
88 int _downsamplingStep;
89 float _rangeMin;
90 float _rangeMax;
91 float _maxCorrespondenceDistance;
92 bool _reciprocalCorrespondences;
93 int _maxIterations;
94 float _epsilon;
95 float _correspondenceRatio;
96 bool _force4DoF;
97 int _filtersEnabled;
98 bool _pointToPlane;
99 int _pointToPlaneK;
100 float _pointToPlaneRadius;
101 float _pointToPlaneGroundNormalsUp;
102 float _pointToPlaneMinComplexity;
103 bool _pointToPlaneComplexityCentered;
104 int _pointToPlaneLowComplexityStrategy;
105 std::string _libpointmatcherConfig;
106 int _libpointmatcherKnn;
107 float _libpointmatcherEpsilon;
108 bool _libpointmatcherIntensity;
109 float _outlierRatio;
110 unsigned int _ccSamplingLimit;
111 bool _ccFilterOutFarthestPoints;
112 double _ccMaxFinalRMS;
113 std::string _debugExportFormat;
114 std::string _workingDir;
115
116 void * _libpointmatcherICP;
117 void * _libpointmatcherICPFilters;
118};
119
120}
121
122#endif /* REGISTRATIONICP_H_ */
static bool available(IcpStrategy strategy)
Returns true if strategy is built into this rtabmap binary.
virtual Transform computeTransformationImpl(Signature &from, Signature &to, Transform guess, RegistrationInfo &info) const
Strategy-specific registration.
virtual void parseParameters(const ParametersMap &parameters)
Parses Reg/RepeatOnce, Reg/Force3DoF and forwards to the child registration if set.
static const char * strategyName(IcpStrategy strategy)
Human-readable name for strategy ("PCL", "libpointmatcher", "CCCoreLib", or "Unknown").
Statistics and diagnostics returned by Registration.
Abstract base for registering two observations (visual, ICP, or both).
Represents a node in RTAB-Map's pose graph.
Definition Signature.h:84
Represents a 3D rigid body transformation (rotation + translation).
Definition Transform.h:53
std::map< std::string, std::string > ParametersMap
Parameter keys mapped to their values, as used by every configurable class (see Parameters).
Definition Parameters.h:44