Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef RTABMAP_REGISTRATION_H_
00029 #define RTABMAP_REGISTRATION_H_
00030
00031 #include "rtabmap/core/RtabmapExp.h"
00032
00033 #include <rtabmap/core/Parameters.h>
00034 #include <rtabmap/core/Signature.h>
00035 #include <rtabmap/core/RegistrationInfo.h>
00036
00037 namespace rtabmap {
00038
00039 class RTABMAP_EXP Registration
00040 {
00041 public:
00042 enum Type {
00043 kTypeUndef = -1,
00044 kTypeVis = 0,
00045 kTypeIcp = 1,
00046 kTypeVisIcp = 2
00047 };
00048 static double COVARIANCE_EPSILON;
00049
00050 public:
00051 static Registration * create(const ParametersMap & parameters);
00052 static Registration * create(Type & type, const ParametersMap & parameters = ParametersMap());
00053
00054 public:
00055 virtual ~Registration();
00056 virtual void parseParameters(const ParametersMap & parameters);
00057
00058 bool isImageRequired() const;
00059 bool isScanRequired() const;
00060 bool isUserDataRequired() const;
00061
00062 bool canUseGuess() const;
00063
00064 int getMinVisualCorrespondences() const;
00065 float getMinGeometryCorrespondencesRatio() const;
00066
00067 bool repeatOnce() const {return repeatOnce_;}
00068 bool force3DoF() const {return force3DoF_;}
00069
00070
00071 void setChildRegistration(Registration * child);
00072
00073 Transform computeTransformation(
00074 const Signature & from,
00075 const Signature & to,
00076 Transform guess = Transform::getIdentity(),
00077 RegistrationInfo * info = 0) const;
00078 Transform computeTransformation(
00079 const SensorData & from,
00080 const SensorData & to,
00081 Transform guess = Transform::getIdentity(),
00082 RegistrationInfo * info = 0) const;
00083
00084 Transform computeTransformationMod(
00085 Signature & from,
00086 Signature & to,
00087 Transform guess = Transform::getIdentity(),
00088 RegistrationInfo * info = 0) const;
00089
00090 protected:
00091
00092 Registration(const ParametersMap & parameters = ParametersMap(), Registration * child = 0);
00093
00094
00095
00096 virtual Transform computeTransformationImpl(
00097 Signature & from,
00098 Signature & to,
00099 Transform guess,
00100 RegistrationInfo & info) const = 0;
00101
00102 virtual bool isImageRequiredImpl() const {return false;}
00103 virtual bool isScanRequiredImpl() const {return false;}
00104 virtual bool isUserDataRequiredImpl() const {return false;}
00105 virtual bool canUseGuessImpl() const {return false;}
00106 virtual int getMinVisualCorrespondencesImpl() const {return 0;}
00107 virtual float getMinGeometryCorrespondencesRatioImpl() const {return 0.0f;}
00108
00109 private:
00110 bool repeatOnce_;
00111 bool force3DoF_;
00112 Registration * child_;
00113
00114 };
00115
00116 }
00117
00118 #endif