Fixed bug in dim (it should be #rows not #columns!) and moved to base class
parent
319d26312e
commit
7c1a795cb4
|
|
@ -25,10 +25,8 @@
|
||||||
#include <gtsam/slam/RegularHessianFactor.h>
|
#include <gtsam/slam/RegularHessianFactor.h>
|
||||||
|
|
||||||
#include <gtsam/nonlinear/NonlinearFactor.h>
|
#include <gtsam/nonlinear/NonlinearFactor.h>
|
||||||
#include <gtsam/geometry/PinholeCamera.h> // for Cheirality exception
|
#include <gtsam/geometry/Point3.h>
|
||||||
#include <gtsam/geometry/StereoCamera.h>
|
#include <gtsam/geometry/CalibratedCamera.h> // for Cheirality exception
|
||||||
#include <gtsam/geometry/Pose3.h>
|
|
||||||
#include <gtsam/inference/Symbol.h>
|
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
|
|
@ -150,6 +148,11 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// get the dimension (number of rows!) of the factor
|
||||||
|
virtual size_t dim() const {
|
||||||
|
return ZDim * this->measured_.size();
|
||||||
|
}
|
||||||
|
|
||||||
/** return the measurements */
|
/** return the measurements */
|
||||||
const std::vector<Z>& measured() const {
|
const std::vector<Z>& measured() const {
|
||||||
return measured_;
|
return measured_;
|
||||||
|
|
|
||||||
|
|
@ -141,11 +141,6 @@ public:
|
||||||
return e && Base::equals(p, tol);
|
return e && Base::equals(p, tol);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// get the dimension of the factor
|
|
||||||
virtual size_t dim() const {
|
|
||||||
return 6 * this->keys_.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collect all cameras involved in this factor
|
* Collect all cameras involved in this factor
|
||||||
* @param values Values structure which must contain camera poses corresponding
|
* @param values Values structure which must contain camera poses corresponding
|
||||||
|
|
|
||||||
|
|
@ -143,11 +143,6 @@ public:
|
||||||
return e && Base::equals(p, tol);
|
return e && Base::equals(p, tol);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// get the dimension of the factor
|
|
||||||
virtual size_t dim() const {
|
|
||||||
return 6 * this->keys_.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collect all cameras involved in this factor
|
* Collect all cameras involved in this factor
|
||||||
* @param values Values structure which must contain camera poses corresponding
|
* @param values Values structure which must contain camera poses corresponding
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue