8 #ifndef __RDL_FORCE_VECTOR_HPP__ 9 #define __RDL_FORCE_VECTOR_HPP__ 34 template <
typename OtherDerived>
45 template <
typename OtherDerived>
78 Base::_check_template_params();
89 (*this) << f.data()[0], f.data()[1], f.data()[2], f.data()[3], f.data()[4], f.data()[5];
96 EIGEN_STRONG_INLINE
double&
mx()
98 return this->data()[0];
105 EIGEN_STRONG_INLINE
double&
my()
107 return this->data()[1];
114 EIGEN_STRONG_INLINE
double&
mz()
116 return this->data()[2];
123 EIGEN_STRONG_INLINE
double mx()
const 125 return this->data()[0];
132 EIGEN_STRONG_INLINE
double my()
const 134 return this->data()[1];
141 EIGEN_STRONG_INLINE
double mz()
const 143 return this->data()[2];
150 EIGEN_STRONG_INLINE
double&
fx()
152 return this->data()[3];
159 EIGEN_STRONG_INLINE
double&
fy()
161 return this->data()[4];
168 EIGEN_STRONG_INLINE
double&
fz()
170 return this->data()[5];
177 EIGEN_STRONG_INLINE
double fx()
const 179 return this->data()[3];
186 EIGEN_STRONG_INLINE
double fy()
const 188 return this->data()[4];
195 EIGEN_STRONG_INLINE
double fz()
const 197 return this->data()[5];
215 *
this << En_rxf[0], En_rxf[1], En_rxf[2], X.
E(0, 0) * this->data()[3] + X.
E(0, 1) * this->data()[4] + X.
E(0, 2) * this->data()[5],
216 X.
E(1, 0) * this->data()[3] + X.
E(1, 1) * this->data()[4] + X.
E(1, 2) * this->data()[5],
217 X.
E(2, 0) * this->data()[3] + X.
E(2, 1) * this->data()[4] + X.
E(2, 2) * this->data()[5];
245 (*this) << (this->
mx() += v.
mx()), (this->
my() += v.
my()), (this->
mz() += v.
mz()), (this->
fx() += v.
fx()), (this->
fy() += v.
fy()), (this->
fz() += v.
fz());
261 typedef std::vector<ForceVector, Eigen::aligned_allocator<ForceVector>>
ForceVectorV;
EIGEN_STRONG_INLINE double my() const
Get copy of y-angular component.
std::vector< ForceVector, Eigen::aligned_allocator< ForceVector > > ForceVectorV
EIGEN_STRONG_INLINE double fx() const
Get copy of x-linear component.
EIGEN_STRONG_INLINE double fz() const
Get copy of z-linear component.
ForceVector operator*(const SpatialTransform &X, ForceVector f)
Operator for transforming a ForceVector. Calls the ForceVector::transform method. ...
EIGEN_STRONG_INLINE double mz() const
Get copy of z-angular component.
A ForceVector is a SpatialVector containing 3 moments and 3 linear forces.
EIGEN_STRONG_INLINE ForceVector()
Empty constructor.
ForceVector & operator=(const Eigen::MatrixBase< OtherDerived > &other)
EIGEN_STRONG_INLINE double & fy()
Get reference to y-linear component.
void transform(const SpatialTransform &X)
Performs the following in place transform .
EIGEN_STRONG_INLINE double & fx()
Get reference to x-linear component.
ForceVector(const double mx, const double my, const double mz, const double fx, const double fy, const double fz)
Constructor.
EIGEN_STRONG_INLINE double & fz()
Get reference to z-linear component.
EIGEN_STRONG_INLINE double & my()
Get reference to y-angular component.
SpatialVector & operator=(const Eigen::MatrixBase< OtherDerived > &other)
EIGEN_STRONG_INLINE double & mz()
Get reference to z-angular component.
EIGEN_STRONG_INLINE Vector3d getAngularPart() const
EIGEN_STRONG_INLINE SpatialVector toSpatialVector() const
Get a copy of a ForceVector as type SpatialVector.
ForceVector(const Eigen::MatrixBase< OtherDerived > &other)
Constructor.
EIGEN_STRONG_INLINE double & mx()
Get reference to x-angular component.
EIGEN_STRONG_INLINE Vector3d getLinearPart() const
ForceVector operator+=(const ForceVector &v)
Overloaded plus-equals operator.
EIGEN_STRONG_INLINE double fy() const
Get copy of y-linear component.
EIGEN_STRONG_INLINE double mx() const
Get copy of x-angular component.
ForceVector transform_copy(const SpatialTransform &X) const
Copy then transform a ForceVector by .
Namespace for all structures of the RobotDynamics library.