SmartFactorParams.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
20 #pragma once
21 
23 
24 namespace gtsam {
25 
29 enum LinearizationMode {
32 };
33 
37 };
38 
39 /*
40  * Parameters for the smart (stereo) projection factors
41  */
43 
46 
51 
57 
59  // Constructor
61  DegeneracyMode degMode = IGNORE_DEGENERACY, bool throwCheirality = false,
62  bool verboseCheirality = false, double retriangulationTh = 1e-5) :
66  }
67 
69  }
70 
71  void print(const std::string& str = "") const {
72  std::cout << "linearizationMode: " << linearizationMode << "\n";
73  std::cout << " degeneracyMode: " << degeneracyMode << "\n";
74  std::cout << triangulation << std::endl;
75  }
76 
77  // get class variables
79  return linearizationMode;
80  }
82  return degeneracyMode;
83  }
85  return triangulation;
86  }
87  bool getVerboseCheirality() const {
88  return verboseCheirality;
89  }
90  bool getThrowCheirality() const {
91  return throwCheirality;
92  }
93  double getRetriangulationThreshold() const {
95  }
96  // set class variables
98  linearizationMode = linMode;
99  }
101  degeneracyMode = degMode;
102  }
103  void setRetriangulationThreshold(double retriangulationTh) {
104  retriangulationThreshold = retriangulationTh;
105  }
106  void setRankTolerance(double rankTol) {
108  }
109  void setEnableEPI(bool enableEPI) {
110  triangulation.enableEPI = enableEPI;
111  }
112  void setLandmarkDistanceThreshold(double landmarkDistanceThreshold) {
113  triangulation.landmarkDistanceThreshold = landmarkDistanceThreshold;
114  }
115  void setDynamicOutlierRejectionThreshold(double dynOutRejectionThreshold) {
116  triangulation.dynamicOutlierRejectionThreshold = dynOutRejectionThreshold;
117  }
118 
119 private:
120 
121 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
122  friend class boost::serialization::access;
124  template<class ARCHIVE>
125  void serialize(ARCHIVE & ar, const unsigned int version) {
126  ar & BOOST_SERIALIZATION_NVP(linearizationMode);
127  ar & BOOST_SERIALIZATION_NVP(degeneracyMode);
128  ar & BOOST_SERIALIZATION_NVP(triangulation);
129  ar & BOOST_SERIALIZATION_NVP(retriangulationThreshold);
130  ar & BOOST_SERIALIZATION_NVP(throwCheirality);
131  ar & BOOST_SERIALIZATION_NVP(verboseCheirality);
132  }
133 #endif
134 };
135 
136 } // \ namespace gtsam
gtsam::SmartProjectionParams::triangulation
TriangulationParameters triangulation
Definition: SmartFactorParams.h:49
gtsam::SmartProjectionParams::getLinearizationMode
LinearizationMode getLinearizationMode() const
Definition: SmartFactorParams.h:78
gtsam::SmartProjectionParams::verboseCheirality
bool verboseCheirality
If true, prints text for Cheirality exceptions (default: false)
Definition: SmartFactorParams.h:56
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
gtsam::HESSIAN
@ HESSIAN
Definition: SmartFactorParams.h:31
gtsam::TriangulationParameters::dynamicOutlierRejectionThreshold
double dynamicOutlierRejectionThreshold
Definition: triangulation.h:579
gtsam::SmartProjectionParams::setRetriangulationThreshold
void setRetriangulationThreshold(double retriangulationTh)
Definition: SmartFactorParams.h:103
gtsam::SmartProjectionParams
Definition: SmartFactorParams.h:42
gtsam::SmartProjectionParams::setLandmarkDistanceThreshold
void setLandmarkDistanceThreshold(double landmarkDistanceThreshold)
Definition: SmartFactorParams.h:112
gtsam::TriangulationParameters::enableEPI
bool enableEPI
if set to true, will refine triangulation using LM
Definition: triangulation.h:566
gtsam::JACOBIAN_Q
@ JACOBIAN_Q
Definition: SmartFactorParams.h:31
rankTol
static const double rankTol
Definition: testSmartProjectionRigFactor.cpp:35
triangulation.h
Functions for triangulation.
gtsam::SmartProjectionParams::degeneracyMode
DegeneracyMode degeneracyMode
How to linearize the factor.
Definition: SmartFactorParams.h:45
gtsam::ZERO_ON_DEGENERACY
@ ZERO_ON_DEGENERACY
Definition: SmartFactorParams.h:36
gtsam::TriangulationParameters::rankTolerance
double rankTolerance
(the rank is the number of singular values of the triangulation matrix which are larger than rankTole...
Definition: triangulation.h:564
gtsam::TriangulationParameters
Definition: triangulation.h:562
gtsam::SmartProjectionParams::setDynamicOutlierRejectionThreshold
void setDynamicOutlierRejectionThreshold(double dynOutRejectionThreshold)
Definition: SmartFactorParams.h:115
gtsam::SmartProjectionParams::setDegeneracyMode
void setDegeneracyMode(DegeneracyMode degMode)
Definition: SmartFactorParams.h:100
gtsam::HANDLE_INFINITY
@ HANDLE_INFINITY
Definition: SmartFactorParams.h:36
gtsam::SmartProjectionParams::setRankTolerance
void setRankTolerance(double rankTol)
Definition: SmartFactorParams.h:106
gtsam::SmartProjectionParams::linearizationMode
LinearizationMode linearizationMode
How to linearize the factor.
Definition: SmartFactorParams.h:44
gtsam::IMPLICIT_SCHUR
@ IMPLICIT_SCHUR
Definition: SmartFactorParams.h:31
gtsam::SmartProjectionParams::getTriangulationParameters
TriangulationParameters getTriangulationParameters() const
Definition: SmartFactorParams.h:84
gtsam::LinearizationMode
LinearizationMode
Linearization mode: what factor to linearize to.
Definition: SmartFactorParams.h:30
gtsam::JACOBIAN_SVD
@ JACOBIAN_SVD
Definition: SmartFactorParams.h:31
gtsam::SmartProjectionParams::getVerboseCheirality
bool getVerboseCheirality() const
Definition: SmartFactorParams.h:87
conf.version
version
Definition: gtsam/3rdparty/GeographicLib/python/doc/conf.py:67
gtsam::SmartProjectionParams::print
void print(const std::string &str="") const
Definition: SmartFactorParams.h:71
gtsam::SmartProjectionParams::getRetriangulationThreshold
double getRetriangulationThreshold() const
Definition: SmartFactorParams.h:93
gtsam::SmartProjectionParams::~SmartProjectionParams
virtual ~SmartProjectionParams()
Definition: SmartFactorParams.h:68
str
Definition: pytypes.h:1558
gtsam
traits
Definition: SFMdata.h:40
gtsam::TriangulationParameters::landmarkDistanceThreshold
double landmarkDistanceThreshold
Definition: triangulation.h:572
gtsam::SmartProjectionParams::setEnableEPI
void setEnableEPI(bool enableEPI)
Definition: SmartFactorParams.h:109
gtsam::SmartProjectionParams::throwCheirality
bool throwCheirality
If true, re-throws Cheirality exceptions (default: false)
Definition: SmartFactorParams.h:55
gtsam::SmartProjectionParams::retriangulationThreshold
double retriangulationThreshold
threshold to decide whether to re-triangulate
Definition: SmartFactorParams.h:50
gtsam::IGNORE_DEGENERACY
@ IGNORE_DEGENERACY
Definition: SmartFactorParams.h:36
gtsam::SmartProjectionParams::SmartProjectionParams
SmartProjectionParams(LinearizationMode linMode=HESSIAN, DegeneracyMode degMode=IGNORE_DEGENERACY, bool throwCheirality=false, bool verboseCheirality=false, double retriangulationTh=1e-5)
Definition: SmartFactorParams.h:60
gtsam::SmartProjectionParams::setLinearizationMode
void setLinearizationMode(LinearizationMode linMode)
Definition: SmartFactorParams.h:97
gtsam::DegeneracyMode
DegeneracyMode
How to manage degeneracy.
Definition: SmartFactorParams.h:35
gtsam::SmartProjectionParams::getThrowCheirality
bool getThrowCheirality() const
Definition: SmartFactorParams.h:90
gtsam::SmartProjectionParams::getDegeneracyMode
DegeneracyMode getDegeneracyMode() const
Definition: SmartFactorParams.h:81


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:13:26