8 #ifndef __RDL_MOMENTUM_HPP__ 9 #define __RDL_MOMENTUM_HPP__ 34 Momentum(
const double kx,
const double ky,
const double kz,
const double lx,
const double ly,
const double lz) :
ForceVector(kx, ky, kz, lx, ly, lz)
84 EIGEN_STRONG_INLINE
double&
kx()
86 return this->data()[0];
89 EIGEN_STRONG_INLINE
double&
ky()
91 return this->data()[1];
94 EIGEN_STRONG_INLINE
double&
kz()
96 return this->data()[2];
99 EIGEN_STRONG_INLINE
double kx()
const 101 return this->data()[0];
104 EIGEN_STRONG_INLINE
double ky()
const 106 return this->data()[1];
109 EIGEN_STRONG_INLINE
double kz()
const 111 return this->data()[2];
114 EIGEN_STRONG_INLINE
double&
lx()
116 return this->data()[3];
119 EIGEN_STRONG_INLINE
double&
ly()
121 return this->data()[4];
124 EIGEN_STRONG_INLINE
double&
lz()
126 return this->data()[5];
129 EIGEN_STRONG_INLINE
double lx()
const 131 return this->data()[3];
134 EIGEN_STRONG_INLINE
double ly()
const 136 return this->data()[4];
139 EIGEN_STRONG_INLINE
double lz()
const 141 return this->data()[5];
150 (*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());
160 (*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());
172 return this->dot(vector) * 0.5;
183 (*this) << I.
Ixx * v[0] + I.
Iyx * v[1] + I.
Izx * v[2] + I.
h[1] * v[5] - I.
h[2] * v[4], I.
Iyx * v[0] + I.
Iyy * v[1] + I.
Izy * v[2] - I.
h[0] * v[5] + I.
h[2] * v[3],
184 I.
Izx * v[0] + I.
Izy * v[1] + I.
Izz * v[2] + I.
h[0] * v[4] - I.
h[1] * v[3], -I.
h[1] * v[2] + I.
h[2] * v[1] + I.
m * v[3],
185 I.
h[0] * v[2] - I.
h[2] * v[0] + I.
m * v[4], -I.
h[0] * v[1] + I.
h[1] * v[0] + I.
m * v[5];
227 #endif // ifndef __RDL_MOMENTUM_HPP__
Momentum(const ForceVector &forceVector)
EIGEN_STRONG_INLINE double & ly()
EIGEN_STRONG_INLINE double ly() const
EIGEN_STRONG_INLINE double kz() const
Momentum transform_copy(const SpatialTransform &X) const
Copy then transform a ForceVector by .
A ForceVector is a SpatialVector containing 3 moments and 3 linear forces.
EIGEN_STRONG_INLINE double & fy()
Get reference to y-linear component.
Momentum(const double kx, const double ky, const double kz, const double lx, const double ly, const double lz)
FramePoint operator+(FramePoint p, const FrameVector &v)
See V. Duindum p39-40 & Featherstone p32-33.
EIGEN_STRONG_INLINE double & kz()
Momentum(const RigidBodyInertia &inertia, const MotionVector &vector)
void computeMomentum(const RigidBodyInertia &I, const MotionVector &v)
Computes momentum from inertia and velocity.
void transform(const SpatialTransform &X)
Performs the following in place transform .
EIGEN_STRONG_INLINE double & fx()
Get reference to x-linear component.
EIGEN_STRONG_INLINE double & fz()
Get reference to z-linear component.
Momentum operator+=(const Momentum &v)
Overloaded plus-equals operator.
EIGEN_STRONG_INLINE double & my()
Get reference to y-angular component.
Momentum(const Momentum &momentum)
Momentum is mass/inertia multiplied by velocity.
This class stores a bodies mass, center of mass, and inertia information. The inertia elements are st...
EIGEN_STRONG_INLINE double & kx()
Momentum(const Vector3d &k, const Vector3d l)
EIGEN_STRONG_INLINE double lx() const
EIGEN_STRONG_INLINE double & mz()
Get reference to z-angular component.
EIGEN_STRONG_INLINE double kx() const
EIGEN_STRONG_INLINE double operator*(const MotionVector &vector)
Operator for computing kinetic energy. With momentum, and Math::MotionVector, this performs perform...
EIGEN_STRONG_INLINE double & lx()
EIGEN_STRONG_INLINE double lz() const
Momentum operator-=(const Momentum &v)
Overloaded plus-equals operator.
FramePoint operator-(FramePoint p, const FrameVector &v)
EIGEN_STRONG_INLINE double & mx()
Get reference to x-angular component.
EIGEN_STRONG_INLINE double & lz()
EIGEN_STRONG_INLINE double ky() const
EIGEN_STRONG_INLINE double & ky()
Namespace for all structures of the RobotDynamics library.