moved common definitions to base class
parent
f2bec78a58
commit
cd9b4cd5ab
|
@ -36,6 +36,16 @@
|
|||
|
||||
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
|
||||
* This base class has no internal point, but it has a measurement, noise model
|
||||
|
|
|
@ -31,16 +31,6 @@
|
|||
|
||||
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
|
||||
*/
|
||||
|
|
|
@ -35,17 +35,7 @@
|
|||
|
||||
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
|
||||
*/
|
||||
struct GTSAM_EXPORT SmartStereoProjectionParams {
|
||||
|
@ -257,7 +247,7 @@ public:
|
|||
const StereoPoint2 zi = measured_[i];
|
||||
monoCameras.push_back(leftCamera_i);
|
||||
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);
|
||||
monoMeasured.push_back(Point2(zi.uR(),zi.v()));
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* @date Sept 2013
|
||||
*/
|
||||
|
||||
// TODO #include <gtsam/slam/tests/smartFactorScenarios.h>
|
||||
#include <gtsam/slam/tests/smartFactorScenarios.h>
|
||||
#include <gtsam_unstable/slam/SmartStereoProjectionPoseFactor.h>
|
||||
#include <gtsam/nonlinear/LevenbergMarquardtOptimizer.h>
|
||||
#include <gtsam/slam/PoseTranslationPrior.h>
|
||||
|
@ -33,8 +33,6 @@ using namespace boost::assign;
|
|||
using namespace gtsam;
|
||||
|
||||
// make a realistic calibration matrix
|
||||
static double fov = 60; // degrees
|
||||
static size_t w = 640, h = 480;
|
||||
static double b = 1;
|
||||
|
||||
static Cal3_S2Stereo::shared_ptr K(new Cal3_S2Stereo(fov, w, h, b));
|
||||
|
|
Loading…
Reference in New Issue