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

[All/Motion] Remove implicit cast

It will be replaced by an explicit constructor on MotionTpl and a setTo method for each joint Motion class.
parent 269bcd85
......@@ -84,10 +84,18 @@ namespace se3
: m_x_dot(x_dot), m_y_dot(y_dot), m_theta_dot(theta_dot)
{}
operator MotionPlain() const
// operator MotionPlain() const
// {
// return MotionPlain(typename MotionPlain::Vector3(m_x_dot,m_y_dot,Scalar(0)),
// typename MotionPlain::Vector3(Scalar(0),Scalar(0),m_theta_dot));
// }
template<typename Derived>
void addTo(MotionDense<Derived> & other) const
{
return MotionPlain(typename MotionPlain::Vector3(m_x_dot,m_y_dot,Scalar(0)),
typename MotionPlain::Vector3(Scalar(0),Scalar(0),m_theta_dot));
other.linear()[0] += m_x_dot;
other.linear()[1] += m_y_dot;
other.angular()[2] += m_theta_dot;
}
template<typename Derived>
......
......@@ -84,8 +84,8 @@ namespace se3
: axis(axis), rate(rate)
{ EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Vector3Like,3); }
operator MotionPlain() const
{ return MotionPlain(axis*rate,MotionPlain::Vector3::Zero());}
// operator MotionPlain() const
// { return MotionPlain(axis*rate,MotionPlain::Vector3::Zero());}
template<typename Derived>
void addTo(MotionDense<Derived> & v) const
......
......@@ -82,7 +82,7 @@ namespace se3
MotionPrismaticTpl() : rate(NAN) {}
MotionPrismaticTpl( const Scalar & v ) : rate(v) {}
inline operator MotionPlain() const { return Axis() * rate; }
// inline operator MotionPlain() const { return Axis() * rate; }
template<typename Derived>
void addTo(MotionDense<Derived> & v_) const
......
......@@ -82,11 +82,11 @@ namespace se3
, w(w)
{}
operator MotionPlain() const
{
return MotionPlain(MotionPlain::Vector3::Zero(),
axis*w);
}
// operator MotionPlain() const
// {
// return MotionPlain(MotionPlain::Vector3::Zero(),
// axis*w);
// }
template<typename MotionDerived>
void addTo(MotionDense<MotionDerived> & v) const
......
......@@ -213,7 +213,7 @@ namespace se3
template<typename OtherScalar>
MotionRevoluteTpl(const OtherScalar & w) : w(w) {}
operator MotionPlain() const { return Axis() * w; }
// operator MotionPlain() const { return Axis() * w; }
template<typename MotionDerived>
void setTo(MotionDense<MotionDerived> & m) const
......
......@@ -86,9 +86,15 @@ namespace se3
Vector3 & operator() () { return w; }
const Vector3 & operator() () const { return w; }
operator MotionPlain() const
// operator MotionPlain() const
// {
// return MotionPlain(MotionPlain::Vector3::Zero(), w);
// }
template<typename MotionDerived>
void addTo(MotionDense<MotionDerived> & other) const
{
return MotionPlain(MotionPlain::Vector3::Zero(), w);
other.angular() += w;
}
template<typename MotionDerived>
......
......@@ -89,10 +89,10 @@ namespace se3
Vector3 & operator()() { return rate; }
const Vector3 & operator()() const { return rate; }
operator MotionPlain() const
{
return MotionPlain(rate,MotionPlain::Vector3::Zero());
}
// operator MotionPlain() const
// {
// return MotionPlain(rate,MotionPlain::Vector3::Zero());
// }
MotionTranslationTpl & operator=(const MotionTranslationTpl & other)
{
......
......@@ -67,7 +67,7 @@ namespace se3
{
typedef typename traits<BiasZeroTpl>::MotionPlain MotionPlain;
operator MotionPlain () const { return MotionPlain::Zero(); }
// operator MotionPlain () const { return MotionPlain::Zero(); }
template<typename D2>
static bool isEqual_impl(const MotionDense<D2> & other)
......
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