Verified Commit b0625af8 authored by Justin Carpentier's avatar Justin Carpentier Committed by Justin Carpentier
Browse files

[Joint/{Spherical,Translation}] Fix constructor for Motion types

parent 74f10b90
......@@ -76,8 +76,12 @@ namespace se3
MOTION_TYPEDEF_TPL(MotionSphericalTpl);
MotionSphericalTpl() : w (Motion::Vector3(NAN, NAN, NAN)) {}
MotionSphericalTpl(const Motion::Vector3 & w) : w (w) {}
MotionSphericalTpl() : w(NAN, NAN, NAN) {}
template<typename Vector3Like>
MotionSphericalTpl(const Eigen::MatrixBase<Vector3Like> & w)
: w(w)
{}
Vector3 & operator() () { return w; }
const Vector3 & operator() () const { return w; }
......
......@@ -75,11 +75,16 @@ namespace se3
MOTION_TYPEDEF_TPL(MotionTranslationTpl);
MotionTranslationTpl() : rate(Motion::Vector3(NAN, NAN, NAN)) {}
MotionTranslationTpl() : rate(NAN, NAN, NAN) {}
template<typename Vector3Like>
MotionTranslationTpl(const Eigen::MatrixBase<Vector3Like> & v) : rate(v) {}
MotionTranslationTpl(const Eigen::MatrixBase<Vector3Like> & v)
: rate(v)
{}
MotionTranslationTpl(const MotionTranslationTpl & other) : rate(other.rate) {}
MotionTranslationTpl(const MotionTranslationTpl & other)
: rate(other.rate)
{}
Vector3 & operator()() { return rate; }
const Vector3 & operator()() const { return rate; }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment