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