Go to the documentation of this file.
31 return MotionVec<T>(vector3_t::Zero(), vector3_t::Zero());
41 MotionVec(
const vector6_t & vec) : angular_(vec.template head<3>()), linear_(vec.template tail<3>()) {}
77 return ((
vector6_t() << angular_, linear_).finished());
83 return MotionVec<T2>(angular_.template cast<T2>(), linear_.template cast<T2>());
89 return MotionVec<T>(angular_ + mv.angular_, linear_ + mv.linear_);
94 return MotionVec<T>(angular_ - mv.angular_, linear_ - mv.linear_);
104 angular_ += mv.angular_;
105 linear_ += mv.linear_;
111 angular_ -= mv.angular_;
112 linear_ -= mv.linear_;
116 template<typename T2, typename std::enable_if<std::is_arithmetic<T2>::value,
int>::type = 0>
119 return MotionVec<T>(scalar * angular_, scalar * linear_);
122 template<typename T2, typename std::enable_if<std::is_arithmetic<T2>::value,
int>::type = 0>
130 template<
typename T2>
138 template<
typename T2>
141 return MotionVec<T>(angular_ / scalar, linear_ / scalar);
148 template<
typename Derived>
149 void cross(
const Eigen::MatrixBase<Derived> & mv2, Eigen::MatrixBase<Derived> & result)
const;
155 template<
typename Derived>
156 void crossDual(
const Eigen::MatrixBase<Derived> & fv2, Eigen::MatrixBase<Derived> & result)
const;
163 return (angular_ == mv.angular_) && (linear_ == mv.linear_);
168 return (angular_ != mv.angular_) || (linear_ != mv.linear_);
176 template<
typename T,
typename T2>
185 out << mv.vector().transpose();
std::ostream & operator<<(std::ostream &out, const ABInertia< T > &abI)
Definition: ABInertia.h:183
MotionVec< T > operator/(T2 scalar) const
Definition: MotionVec.h:139
ForceVec< T > crossDual(const ForceVec< T > &fv2) const
Definition: Operators.h:132
Definition: ForceVec.h:19
MotionVec< T > operator*(T2 scalar) const
Definition: MotionVec.h:117
Eigen::Vector6< T > vector6_t
Definition: MotionVec.h:23
Definition: ABInertia.h:10
T dot(const ForceVec< T > &fv2) const
Definition: Operators.h:151
bool operator==(const MotionVec< T > &mv) const
Definition: MotionVec.h:161
const vector3_t & angular() const
Definition: MotionVec.h:51
MotionVec< T > operator+(const MotionVec< T > &mv) const
Definition: MotionVec.h:87
vector3_t & linear()
Definition: MotionVec.h:69
Matrix< T, 3, 1 > Vector3
Definition: EigenTypedef.h:18
MotionVec(const vector3_t &angular, const vector3_t &linear)
Definition: MotionVec.h:47
static MotionVec< T > Zero()
Zero motion vector.
Definition: MotionVec.h:29
const vector3_t & linear() const
Definition: MotionVec.h:63
Eigen::Vector3< T > vector3_t
Definition: MotionVec.h:22
bool operator!=(const MotionVec< T > &mv) const
Definition: MotionVec.h:166
ABInertia< T > operator*(T2 scalar, const ABInertia< T > &abI)
Definition: ABInertia.h:177
vector3_t & angular()
Definition: MotionVec.h:57
MotionVec< T > & operator+=(const MotionVec< T > &mv)
Definition: MotionVec.h:102
MotionVec< T > operator-(const MotionVec< T > &mv) const
Definition: MotionVec.h:92
Matrix< T, 6, 1 > Vector6
Definition: EigenTypedef.h:13
MotionVec< T > & operator-=(const MotionVec< T > &mv)
Definition: MotionVec.h:109
MotionVec< T > & operator/=(T2 scalar)
Definition: MotionVec.h:131
MotionVec(const vector6_t &vec)
Definition: MotionVec.h:41
MotionVec()
Definition: MotionVec.h:35
MotionVec< T2 > cast() const
Definition: MotionVec.h:81
vector6_t vector() const
Definition: MotionVec.h:75
MotionVec< T > & operator*=(T2 scalar)
Definition: MotionVec.h:123
MotionVec< T > operator-() const
Definition: MotionVec.h:97
MotionVec< T > cross(const MotionVec< T > &mv2) const
Definition: Operators.h:113