5 #ifndef __RDL_SPATIAL_MOTION_HPP__
6 #define __RDL_SPATIAL_MOTION_HPP__
58 const double vx,
const double vy,
const double vz)
260 v1.SpatialMotion::operator%=(v2);
263 typedef std::vector<SpatialMotion, Eigen::aligned_allocator<SpatialMotion>>
SpatialMotionV;
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
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 FrameVector is a 3D vector with a ReferenceFrame, and all operations between FrameVectors and other...
Definition: FrameVector.hpp:31
Definition: MotionVector.hpp:21
EIGEN_STRONG_INLINE double & vy()
Get a reference to the linear-y component.
Definition: MotionVector.hpp:156
EIGEN_STRONG_INLINE double & wy()
Get a reference to the angular-y component.
Definition: MotionVector.hpp:102
EIGEN_STRONG_INLINE double & vx()
Get a reference to the linear-x component.
Definition: MotionVector.hpp:147
EIGEN_STRONG_INLINE double & vz()
Get a reference to the linear-z component.
Definition: MotionVector.hpp:165
EIGEN_STRONG_INLINE void set(const MotionVector &v)
Setter.
Definition: MotionVector.hpp:84
EIGEN_STRONG_INLINE double & wz()
Get a reference to the angular-z component.
Definition: MotionVector.hpp:111
EIGEN_STRONG_INLINE double & wx()
Get a reference to the angular-x component.
Definition: MotionVector.hpp:93
A SpatialMotion vector is a MotionVector with a RobotDynamics::ReferenceFrame it is expressed in....
Definition: SpatialMotion.hpp:33
SpatialMotion(ReferenceFramePtr bodyFrame, ReferenceFramePtr baseFrame, ReferenceFramePtr expressedInFrame, const Vector3d &w, const Vector3d v)
Constructor.
Definition: SpatialMotion.hpp:73
SpatialMotion()
Constructor. SpatialMotion::bodyFrame, SpatialMotion::baseFrame, and RobotDynamics::FrameObject::refe...
Definition: SpatialMotion.hpp:39
void setIncludingFrame(ReferenceFramePtr referenceFrame, const SpatialVector &v)
Definition: SpatialMotion.hpp:166
void setIncludingFrame(ReferenceFramePtr referenceFrame, Vector3d angularPart, Vector3d linearPart)
Definition: SpatialMotion.hpp:178
void setBaseFrame(ReferenceFramePtr referenceFrame)
Sets the base frame of a spatial motion.
Definition: SpatialMotion.hpp:236
FrameVector getFramedLinearPart() const
Get linear part of spatial motion as a frame vector.
Definition: SpatialMotion.hpp:108
void setIncludingFrame(ReferenceFramePtr referenceFrame, double wx, double wy, double wz, double vx, double vy, double vz)
Definition: SpatialMotion.hpp:172
SpatialMotion changeFrameAndCopy(ReferenceFramePtr referenceFrame) const
Copy and change frame.
Definition: SpatialMotion.hpp:132
ReferenceFramePtr baseFrame
Definition: SpatialMotion.hpp:243
void operator%=(const SpatialMotion &v)
This is an operator for performing what is referred to in Featherstone as the spatial vector cross( )...
Definition: SpatialMotion.cpp:53
ReferenceFramePtr getBaseFrame() const
Get a SpatialMotions SpatialMotion::baseFrame.
Definition: SpatialMotion.hpp:152
SpatialMotion(const SpatialMotion &spatialMotion)
Copy constructor.
Definition: SpatialMotion.hpp:98
SpatialMotion(ReferenceFramePtr bodyFrame, ReferenceFramePtr baseFrame, ReferenceFramePtr expressedInFrame, const double wx, const double wy, const double wz, const double vx, const double vy, const double vz)
Constructor.
Definition: SpatialMotion.hpp:57
FrameVector getFramedAngularPart() const
Get angular part of spatial motion as a frame vector.
Definition: SpatialMotion.hpp:117
ReferenceFramePtr bodyFrame
Definition: SpatialMotion.hpp:242
SpatialMotion(ReferenceFramePtr bodyFrame, ReferenceFramePtr baseFrame, ReferenceFramePtr expressedInFrame, const SpatialVector &v)
Constructor.
Definition: SpatialMotion.hpp:87
MotionVector toMotionVector() const
Get a copy of this SpatialMotion as type MotionVector.
Definition: SpatialMotion.hpp:161
SpatialMotion & operator=(const SpatialMotion &v)
Definition: SpatialMotion.hpp:184
void setBodyFrame(ReferenceFramePtr referenceFrame)
Sets the body frame of a spatial motion.
Definition: SpatialMotion.hpp:227
void operator+=(const SpatialMotion &v)
Overloaded += operator. Frame checks are performed.
Definition: SpatialMotion.cpp:11
Math::TransformableGeometricObject * getTransformableGeometricObject()
Pure virtual method that FrameObjects are required to implement so the FrameObject::changeFrame metho...
Definition: SpatialMotion.hpp:122
ReferenceFramePtr getBodyFrame() const
Get a SpatialMotions SpatialMotion::bodyFrame.
Definition: SpatialMotion.hpp:143
void operator-=(const SpatialMotion &v)
Overloaded -= operator. Frame checks are performed.
Definition: SpatialMotion.cpp:27
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< SpatialMotion, Eigen::aligned_allocator< SpatialMotion > > SpatialMotionV
Definition: SpatialMotion.hpp:263
FramePoint operator-(FramePoint p, const FrameVector &v)
Definition: FramePoint.hpp:410
FramePoint operator+(FramePoint p, const FrameVector &v)
Definition: FramePoint.hpp:404
MotionVector operator%(MotionVector v, const MotionVector &v2)
Definition: MotionVector.hpp:332
Namespace for all structures of the RobotDynamics library.
Definition: examples.hpp:19