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/RtabmapExp.h" // DLL export/import defines
32 
34 #include <rtabmap/core/Signature.h>
36 
37 namespace rtabmap {
38 
40 {
41 public:
42  enum Type {
43  kTypeUndef = -1,
44  kTypeVis = 0,
45  kTypeIcp = 1,
46  kTypeVisIcp = 2
47  };
48  static double COVARIANCE_EPSILON;
49 
50 public:
51  static Registration * create(const ParametersMap & parameters);
52  static Registration * create(Type & type, const ParametersMap & parameters = ParametersMap());
53 
54 public:
55  virtual ~Registration();
56  virtual void parseParameters(const ParametersMap & parameters);
57 
58  bool isImageRequired() const;
59  bool isScanRequired() const;
60  bool isUserDataRequired() const;
61 
62  bool canUseGuess() const;
63 
64  int getMinVisualCorrespondences() const;
65  float getMinGeometryCorrespondencesRatio() const;
66 
67  bool repeatOnce() const {return repeatOnce_;}
68  bool force3DoF() const {return force3DoF_;}
69 
70  // take ownership!
71  void setChildRegistration(Registration * child);
72 
73  Transform computeTransformation(
74  const Signature & from,
75  const Signature & to,
77  RegistrationInfo * info = 0) const;
78  Transform computeTransformation(
79  const SensorData & from,
80  const SensorData & to,
82  RegistrationInfo * info = 0) const;
83 
84  Transform computeTransformationMod(
85  Signature & from,
86  Signature & to,
88  RegistrationInfo * info = 0) const;
89 
90 protected:
91  // take ownership of child
92  Registration(const ParametersMap & parameters = ParametersMap(), Registration * child = 0);
93 
94  // It is safe to modify the signatures in the implementation, if so, the
95  // child registration will use these modifications.
96  virtual Transform computeTransformationImpl(
97  Signature & from,
98  Signature & to,
99  Transform guess,
100  RegistrationInfo & info) const = 0;
101 
102  virtual bool isImageRequiredImpl() const {return false;}
103  virtual bool isScanRequiredImpl() const {return false;}
104  virtual bool isUserDataRequiredImpl() const {return false;}
105  virtual bool canUseGuessImpl() const {return false;}
106  virtual int getMinVisualCorrespondencesImpl() const {return 0;}
107  virtual float getMinGeometryCorrespondencesRatioImpl() const {return 0.0f;}
108 
109 private:
113 
114 };
115 
116 }
117 
118 #endif /* RTABMAP_REGISTRATION_H_ */
virtual bool isScanRequiredImpl() const
Definition: Registration.h:103
static double COVARIANCE_EPSILON
Definition: Registration.h:48
static Transform getIdentity()
Definition: Transform.cpp:364
bool repeatOnce() const
Definition: Registration.h:67
std::map< std::string, std::string > ParametersMap
Definition: Parameters.h:41
bool force3DoF() const
Definition: Registration.h:68
virtual bool isImageRequiredImpl() const
Definition: Registration.h:102
#define RTABMAP_EXP
Definition: RtabmapExp.h:38
virtual bool canUseGuessImpl() const
Definition: Registration.h:105
Registration * child_
Definition: Registration.h:112
virtual float getMinGeometryCorrespondencesRatioImpl() const
Definition: Registration.h:107
virtual int getMinVisualCorrespondencesImpl() const
Definition: Registration.h:106
virtual bool isUserDataRequiredImpl() const
Definition: Registration.h:104


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:41:32