Using FixedDimension
parent
4078f02c1f
commit
6a52d93e96
|
@ -38,7 +38,7 @@ private:
|
|||
|
||||
GTSAM_CONCEPT_MANIFOLD_TYPE(Calibration)
|
||||
|
||||
// Get dimensions of calibration type and This at compile time
|
||||
// Get dimensions of calibration type at compile time
|
||||
static const int DimK = FixedDimension<Calibration>::value;
|
||||
|
||||
public:
|
||||
|
|
|
@ -29,6 +29,10 @@ public:
|
|||
GTSAM_CONCEPT_GROUP_TYPE(Pose)
|
||||
GTSAM_CONCEPT_LIE_TYPE(Rotation)
|
||||
|
||||
// Get dimensions of pose and rotation type at compile time
|
||||
static const int xDim = FixedDimension<POSE>::value;
|
||||
static const int rDim = FixedDimension<POSE::Rotation>::value;
|
||||
|
||||
protected:
|
||||
|
||||
Rotation measured_;
|
||||
|
@ -70,7 +74,6 @@ public:
|
|||
/** h(x)-z */
|
||||
Vector evaluateError(const Pose& pose, boost::optional<Matrix&> H = boost::none) const {
|
||||
const Rotation& newR = pose.rotation();
|
||||
const size_t rDim = newR.dim(), xDim = pose.dim();
|
||||
if (H) {
|
||||
*H = gtsam::zeros(rDim, xDim);
|
||||
std::pair<size_t, size_t> rotInterval = POSE::rotationInterval();
|
||||
|
|
Loading…
Reference in New Issue