stuck since LieMatrix uses dynamic matrices and hence not compatible with traits
parent
3dc9a7c852
commit
e9ae4f3c4d
|
@ -38,7 +38,7 @@ namespace gtsam {
|
||||||
LieScalar() : d_(0.0) {}
|
LieScalar() : d_(0.0) {}
|
||||||
|
|
||||||
/** wrap a double */
|
/** wrap a double */
|
||||||
explicit LieScalar(double d) : d_(d) {}
|
/*explicit*/ LieScalar(double d) : d_(d) {}
|
||||||
|
|
||||||
/** access the underlying value */
|
/** access the underlying value */
|
||||||
double value() const { return d_; }
|
double value() const { return d_; }
|
||||||
|
|
|
@ -35,4 +35,5 @@ void LieVector::print(const std::string& name) const {
|
||||||
gtsam::print(vector(), name);
|
gtsam::print(vector(), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GTSAM_CONCEPT_LIE_INST(LieVector)
|
||||||
} // \namespace gtsam
|
} // \namespace gtsam
|
||||||
|
|
|
@ -112,8 +112,11 @@ public:
|
||||||
Eigen::Map<Fixed>* operator->(){ return &map_; }
|
Eigen::Map<Fixed>* operator->(){ return &map_; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
// these make sure that no dynamic sized matrices are compiled.
|
||||||
class OptionalJacobian<-1, -1> {};
|
template<int Cols>
|
||||||
|
class OptionalJacobian<-1, Cols> {};
|
||||||
|
template<int Rows>
|
||||||
|
class OptionalJacobian<Rows, -1> {};
|
||||||
|
|
||||||
} // namespace gtsam
|
} // namespace gtsam
|
||||||
|
|
||||||
|
|
|
@ -67,9 +67,10 @@ namespace internal {
|
||||||
/// A helper that implements the traits interface for GTSAM manifolds.
|
/// A helper that implements the traits interface for GTSAM manifolds.
|
||||||
/// To use this for your gtsam type, define:
|
/// To use this for your gtsam type, define:
|
||||||
/// template<> struct traits<Type> : public Manifold<Type> { };
|
/// template<> struct traits<Type> : public Manifold<Type> { };
|
||||||
template<typename ManifoldType>
|
template<typename _ManifoldType>
|
||||||
struct Manifold {
|
struct Manifold {
|
||||||
// Typedefs required by all manifold types.
|
// Typedefs required by all manifold types.
|
||||||
|
typedef _ManifoldType ManifoldType;
|
||||||
typedef manifold_tag structure_category;
|
typedef manifold_tag structure_category;
|
||||||
enum { dimension = ManifoldType::dimension };
|
enum { dimension = ManifoldType::dimension };
|
||||||
typedef Eigen::Matrix<double, dimension, 1> TangentVector;
|
typedef Eigen::Matrix<double, dimension, 1> TangentVector;
|
||||||
|
@ -117,9 +118,10 @@ struct Manifold {
|
||||||
/// A helper that implements the traits interface for GTSAM lie groups.
|
/// A helper that implements the traits interface for GTSAM lie groups.
|
||||||
/// To use this for your gtsam type, define:
|
/// To use this for your gtsam type, define:
|
||||||
/// template<> struct traits<Type> : public LieGroup<Type> { };
|
/// template<> struct traits<Type> : public LieGroup<Type> { };
|
||||||
template<typename ManifoldType,typename _group_flavor = additive_group_tag>
|
template<typename _ManifoldType,typename _group_flavor = additive_group_tag>
|
||||||
struct LieGroup {
|
struct LieGroup {
|
||||||
// Typedefs required by all manifold types.
|
// Typedefs required by all manifold types.
|
||||||
|
typedef _ManifoldType ManifoldType;
|
||||||
typedef lie_group_tag structure_category;
|
typedef lie_group_tag structure_category;
|
||||||
typedef _group_flavor group_flavor;
|
typedef _group_flavor group_flavor;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue