Registration.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, 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 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON 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
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef RTABMAP_REGISTRATION_H_
29 #define RTABMAP_REGISTRATION_H_
30 
31 #include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
32 
34 #include <rtabmap/core/Signature.h>
36 
37 namespace rtabmap {
38 
39 class RTABMAP_CORE_EXPORT Registration
40 {
41 public:
42  enum Type {
43  kTypeUndef = -1,
44  kTypeVis = 0,
45  kTypeIcp = 1,
46  kTypeVisIcp = 2
47  };
50 
51 public:
52  static Registration * create(const ParametersMap & parameters);
53  static Registration * create(Type & type, const ParametersMap & parameters = ParametersMap());
54 
55 public:
56  virtual ~Registration();
57  virtual void parseParameters(const ParametersMap & parameters);
58 
59  bool isImageRequired() const;
60  bool isScanRequired() const;
61  bool isUserDataRequired() const;
62 
63  bool canUseGuess() const;
64 
65  int getMinVisualCorrespondences() const;
66  float getMinGeometryCorrespondencesRatio() const;
67 
68  bool repeatOnce() const {return repeatOnce_;}
69  bool force3DoF() const {return force3DoF_;}
70 
71  // take ownership!
72  void setChildRegistration(Registration * child);
73 
74  Transform computeTransformation(
75  const Signature & from,
76  const Signature & to,
78  RegistrationInfo * info = 0) const;
79  Transform computeTransformation(
80  const SensorData & from,
81  const SensorData & to,
83  RegistrationInfo * info = 0) const;
84 
85  Transform computeTransformationMod(
86  Signature & from,
87  Signature & to,
89  RegistrationInfo * info = 0) const;
90 
91 protected:
92  // take ownership of child
93  Registration(const ParametersMap & parameters = ParametersMap(), Registration * child = 0);
94 
95  // It is safe to modify the signatures in the implementation, if so, the
96  // child registration will use these modifications.
97  virtual Transform computeTransformationImpl(
98  Signature & from,
99  Signature & to,
100  Transform guess,
101  RegistrationInfo & info) const = 0;
102 
103  virtual bool isImageRequiredImpl() const {return false;}
104  virtual bool isScanRequiredImpl() const {return false;}
105  virtual bool isUserDataRequiredImpl() const {return false;}
106  virtual bool canUseGuessImpl() const {return false;}
107  virtual int getMinVisualCorrespondencesImpl() const {return 0;}
108  virtual float getMinGeometryCorrespondencesRatioImpl() const {return 0.0f;}
109 
110 private:
114 
115 };
116 
117 }
118 
119 #endif /* RTABMAP_REGISTRATION_H_ */
rtabmap::SensorData
Definition: SensorData.h:51
create
ADT create(const Signature &signature)
rtabmap::Registration
Definition: Registration.h:39
rtabmap::Registration::repeatOnce_
bool repeatOnce_
Definition: Registration.h:111
rtabmap::RegistrationInfo
Definition: RegistrationInfo.h:34
rtabmap::Transform::getIdentity
static Transform getIdentity()
Definition: Transform.cpp:411
RegistrationInfo.h
type
rtabmap::Registration::force3DoF
bool force3DoF() const
Definition: Registration.h:69
rtabmap::ParametersMap
std::map< std::string, std::string > ParametersMap
Definition: Parameters.h:43
rtabmap::Registration::COVARIANCE_LINEAR_EPSILON
static double COVARIANCE_LINEAR_EPSILON
Definition: Registration.h:48
rtabmap::Registration::getMinVisualCorrespondencesImpl
virtual int getMinVisualCorrespondencesImpl() const
Definition: Registration.h:107
Parameters.h
Type
Signature.h
rtabmap::Registration::isImageRequiredImpl
virtual bool isImageRequiredImpl() const
Definition: Registration.h:103
rtabmap::Registration::child_
Registration * child_
Definition: Registration.h:113
rtabmap::Registration::getMinGeometryCorrespondencesRatioImpl
virtual float getMinGeometryCorrespondencesRatioImpl() const
Definition: Registration.h:108
rtabmap::Registration::isScanRequiredImpl
virtual bool isScanRequiredImpl() const
Definition: Registration.h:104
rtabmap::Registration::isUserDataRequiredImpl
virtual bool isUserDataRequiredImpl() const
Definition: Registration.h:105
rtabmap::Transform
Definition: Transform.h:41
rtabmap::Registration::canUseGuessImpl
virtual bool canUseGuessImpl() const
Definition: Registration.h:106
rtabmap::Registration::repeatOnce
bool repeatOnce() const
Definition: Registration.h:68
rtabmap
Definition: CameraARCore.cpp:35
rtabmap::Registration::force3DoF_
bool force3DoF_
Definition: Registration.h:112
rtabmap::Registration::COVARIANCE_ANGULAR_EPSILON
static double COVARIANCE_ANGULAR_EPSILON
Definition: Registration.h:49
rtabmap::Signature
Definition: Signature.h:48


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:15