moved common definitions to base class
parent
f2bec78a58
commit
cd9b4cd5ab
|
@ -36,6 +36,16 @@
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
|
/// Linearization mode: what factor to linearize to
|
||||||
|
enum LinearizationMode {
|
||||||
|
HESSIAN, IMPLICIT_SCHUR, JACOBIAN_Q, JACOBIAN_SVD
|
||||||
|
};
|
||||||
|
|
||||||
|
/// How to manage degeneracy
|
||||||
|
enum DegeneracyMode {
|
||||||
|
IGNORE_DEGENERACY, ZERO_ON_DEGENERACY, HANDLE_INFINITY
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Base class for smart factors
|
* @brief Base class for smart factors
|
||||||
* This base class has no internal point, but it has a measurement, noise model
|
* This base class has no internal point, but it has a measurement, noise model
|
||||||
|
|
|
@ -31,16 +31,6 @@
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
/// Linearization mode: what factor to linearize to
|
|
||||||
enum LinearizationMode {
|
|
||||||
HESSIAN, IMPLICIT_SCHUR, JACOBIAN_Q, JACOBIAN_SVD
|
|
||||||
};
|
|
||||||
|
|
||||||
/// How to manage degeneracy
|
|
||||||
enum DegeneracyMode {
|
|
||||||
IGNORE_DEGENERACY, ZERO_ON_DEGENERACY, HANDLE_INFINITY
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parameters for the smart projection factors
|
* Parameters for the smart projection factors
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -35,16 +35,6 @@
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
/// Linearization mode: what factor to linearize to
|
|
||||||
enum LinearizationMode {
|
|
||||||
HESSIAN, IMPLICIT_SCHUR, JACOBIAN_Q, JACOBIAN_SVD
|
|
||||||
};
|
|
||||||
|
|
||||||
/// How to manage degeneracy
|
|
||||||
enum DegeneracyMode {
|
|
||||||
IGNORE_DEGENERACY, ZERO_ON_DEGENERACY, HANDLE_INFINITY
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parameters for the smart stereo projection factors
|
* Parameters for the smart stereo projection factors
|
||||||
*/
|
*/
|
||||||
|
@ -257,7 +247,7 @@ public:
|
||||||
const StereoPoint2 zi = measured_[i];
|
const StereoPoint2 zi = measured_[i];
|
||||||
monoCameras.push_back(leftCamera_i);
|
monoCameras.push_back(leftCamera_i);
|
||||||
monoMeasured.push_back(Point2(zi.uL(),zi.v()));
|
monoMeasured.push_back(Point2(zi.uL(),zi.v()));
|
||||||
if(!isnan(zi.uR())){ // if right point is valid
|
if(!std::isnan(zi.uR())){ // if right point is valid
|
||||||
monoCameras.push_back(rightCamera_i);
|
monoCameras.push_back(rightCamera_i);
|
||||||
monoMeasured.push_back(Point2(zi.uR(),zi.v()));
|
monoMeasured.push_back(Point2(zi.uR(),zi.v()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* @date Sept 2013
|
* @date Sept 2013
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO #include <gtsam/slam/tests/smartFactorScenarios.h>
|
#include <gtsam/slam/tests/smartFactorScenarios.h>
|
||||||
#include <gtsam_unstable/slam/SmartStereoProjectionPoseFactor.h>
|
#include <gtsam_unstable/slam/SmartStereoProjectionPoseFactor.h>
|
||||||
#include <gtsam/nonlinear/LevenbergMarquardtOptimizer.h>
|
#include <gtsam/nonlinear/LevenbergMarquardtOptimizer.h>
|
||||||
#include <gtsam/slam/PoseTranslationPrior.h>
|
#include <gtsam/slam/PoseTranslationPrior.h>
|
||||||
|
@ -33,8 +33,6 @@ using namespace boost::assign;
|
||||||
using namespace gtsam;
|
using namespace gtsam;
|
||||||
|
|
||||||
// make a realistic calibration matrix
|
// make a realistic calibration matrix
|
||||||
static double fov = 60; // degrees
|
|
||||||
static size_t w = 640, h = 480;
|
|
||||||
static double b = 1;
|
static double b = 1;
|
||||||
|
|
||||||
static Cal3_S2Stereo::shared_ptr K(new Cal3_S2Stereo(fov, w, h, b));
|
static Cal3_S2Stereo::shared_ptr K(new Cal3_S2Stereo(fov, w, h, b));
|
||||||
|
|
Loading…
Reference in New Issue