5 #ifndef __RDL_SPATIAL_FORCE_HPP__
6 #define __RDL_SPATIAL_FORCE_HPP__
186 this->
mx() += f.
mx();
187 this->
my() += f.
my();
188 this->
mz() += f.
mz();
190 this->
fx() += f.
fx();
191 this->
fy() += f.
fy();
192 this->
fz() += f.
fz();
206 this->
mx() -= f.
mx();
207 this->
my() -= f.
my();
208 this->
mz() -= f.
mz();
210 this->
fx() -= f.
fx();
211 this->
fy() -= f.
fy();
212 this->
fz() -= f.
fz();
252 typedef std::vector<SpatialForce, Eigen::aligned_allocator<SpatialForce>>
SpatialForceV;
Contains various geometric objects that have methods for transforming themselves into different frame...
An interface that objects with a ReferenceFrame extend to inherit the FrameObject::changeFrame method...
Definition: FrameObject.hpp:26
virtual void changeFrame(ReferenceFramePtr desiredFrame)
Change the ReferenceFrame this FrameObject is expressed in.
Definition: FrameObject.cpp:9
void checkReferenceFramesMatch(const FrameObject *frameObject) const
Check if two FrameObjects hold the same ReferenceFrame.
Definition: FrameObject.hpp:67
ReferenceFramePtr getReferenceFrame() const
Get a pointer to the reference frame this FrameObject is expressed in.
Definition: FrameObject.hpp:49
ReferenceFramePtr referenceFrame
Definition: FrameObject.hpp:78
A ForceVector is a SpatialVector containing 3 moments and 3 linear forces.
Definition: ForceVector.hpp:23
EIGEN_STRONG_INLINE double & fx()
Get reference to x-linear component.
Definition: ForceVector.hpp:145
EIGEN_STRONG_INLINE ForceVector()
Empty constructor.
Definition: ForceVector.hpp:50
EIGEN_STRONG_INLINE double & my()
Get reference to y-angular component.
Definition: ForceVector.hpp:100
EIGEN_STRONG_INLINE void set(const ForceVector &f)
Setter.
Definition: ForceVector.hpp:82
EIGEN_STRONG_INLINE double & fy()
Get reference to y-linear component.
Definition: ForceVector.hpp:154
EIGEN_STRONG_INLINE double & mz()
Get reference to z-angular component.
Definition: ForceVector.hpp:109
EIGEN_STRONG_INLINE double & fz()
Get reference to z-linear component.
Definition: ForceVector.hpp:163
EIGEN_STRONG_INLINE double & mx()
Get reference to x-angular component.
Definition: ForceVector.hpp:91
A FrameVector is a 3D vector with a ReferenceFrame, and all operations between FrameVectors and other...
Definition: FrameVector.hpp:31
A SpatialForce is a spatial vector with the angular part being three moments and the linear part bein...
Definition: SpatialForce.hpp:30
SpatialForce(ReferenceFramePtr referenceFrame, const double mx, const double my, const double mz, const double fx, const double fy, const double fz)
Constructor.
Definition: SpatialForce.hpp:57
void setIncludingFrame(ReferenceFramePtr referenceFrame, const Vector3d &m, const Vector3d &f)
Definition: SpatialForce.hpp:153
SpatialForce(ReferenceFramePtr referenceFrame)
Constructor. Force vector elements will be zero.
Definition: SpatialForce.hpp:43
SpatialForce(const SpatialForce &spatialForce)
Copy constructor.
Definition: SpatialForce.hpp:119
SpatialForce(ReferenceFramePtr referenceFrame, const Vector3d &m, const Vector3d f)
Constructor.
Definition: SpatialForce.hpp:68
SpatialForce operator-=(const SpatialForce &f)
Overloaded -= operator. Frame checks are performed.
Definition: SpatialForce.hpp:202
void setIncludingFrame(ReferenceFramePtr referenceFrame, const SpatialVector &v)
Definition: SpatialForce.hpp:141
SpatialForce changeFrameAndCopy(ReferenceFramePtr referenceFrame) const
Copy and change frame.
Definition: SpatialForce.hpp:90
FrameVector getFramedLinearPart() const
Get linear part of spatial force as a frame vector.
Definition: SpatialForce.hpp:101
SpatialForce()
Constructor. RobotDynamics::FrameObject::referenceFrame is initialized to nullptr.
Definition: SpatialForce.hpp:35
SpatialForce(ReferenceFramePtr referenceFrame, const SpatialVector &spatialVector)
Constructor.
Definition: SpatialForce.hpp:128
SpatialForce operator+=(const SpatialForce &f)
Overloaded += operator. Frame checks are performed.
Definition: SpatialForce.hpp:182
ForceVector toForceVector() const
Get copy of this SpatialForce as type ForceVector.
Definition: SpatialForce.hpp:136
SpatialForce & operator=(const SpatialForce &f)
Definition: SpatialForce.hpp:73
SpatialForce operator*=(double scale)
Operator for scaling a spatial force vector.
Definition: SpatialForce.hpp:164
Math::TransformableGeometricObject * getTransformableGeometricObject()
Pure virtual method that FrameObjects are required to implement so the FrameObject::changeFrame metho...
Definition: SpatialForce.hpp:80
FrameVector getFramedAngularPart() const
Get angular part of spatial force as a frame vector.
Definition: SpatialForce.hpp:110
void setIncludingFrame(ReferenceFramePtr referenceFrame, double wx, double wy, double wz, double vx, double vy, double vz)
Definition: SpatialForce.hpp:147
Definition: rdl_eigenmath.hpp:187
SpatialVector & operator=(const Eigen::MatrixBase< OtherDerived > &other)
Definition: rdl_eigenmath.hpp:198
EIGEN_STRONG_INLINE void set(const double &v0, const double &v1, const double &v2, const double &v3, const double &v4, const double &v5)
Definition: rdl_eigenmath.hpp:223
EIGEN_STRONG_INLINE Vector3d getLinearPart() const
Definition: rdl_eigenmath.hpp:235
EIGEN_STRONG_INLINE Vector3d getAngularPart() const
Definition: rdl_eigenmath.hpp:230
Definition: rdl_eigenmath.hpp:54
std::shared_ptr< ReferenceFrame > ReferenceFramePtr
Definition: ReferenceFrame.hpp:68
std::vector< SpatialForce, Eigen::aligned_allocator< SpatialForce > > SpatialForceV
Definition: SpatialForce.hpp:252
FramePoint operator-(FramePoint p, const FrameVector &v)
Definition: FramePoint.hpp:410
FramePoint operator+(FramePoint p, const FrameVector &v)
Definition: FramePoint.hpp:404
ForceVector operator*(const SpatialTransform &X, ForceVector f)
Operator for transforming a ForceVector. Calls the ForceVector::transform method.
Definition: ForceVector.hpp:248
Namespace for all structures of the RobotDynamics library.
Definition: examples.hpp:19