|
| | SpatialVector (const SpatialVector &)=default |
| | SpatialVector (SpatialVector &&)=default |
| SpatialVector & | operator= (const SpatialVector &)=default |
| SpatialVector & | operator= (SpatialVector &&)=default |
| const RotationalT & | getRotational () const & |
| | The rotational part, e.g. the angular velocity of a spatial velocity.
|
| RotationalT | getRotational () && |
| | The rotational part of a temporary is moved out of it.
|
| const TranslationalT & | getTranslational () const & |
| | The translational part, e.g. the velocity of the point of a spatial velocity.
|
| TranslationalT | getTranslational () && |
| | The translational part of a temporary is moved out of it.
|
| template<typename OtherT_, typename RotationalOtherT_, typename TranslationalOtherT_> |
| bool | isApprox (const SpatialVector< OtherT_, RotationalOtherT_, TranslationalOtherT_ > &other, const ValueT precision=Precision< ValueT >::value()) const |
| | Whether both spatial vectors, which must have the same tags, are approximately equal: their rotational and their translational parts are compared separately, like tensors (see Tensor::isApprox()), so that the units of one part do not weigh against those of the other.
|
template<typename DerivedT_, AnyTensor RotationalT_, AnyTensor TranslationalT_>
class wuzp::SpatialVector< DerivedT_, RotationalT_, TranslationalT_ >
The base class of the spatial vectors SpatialVelocity, SpatialAcceleration and SpatialForce: a rotational and a translational part, two three-dimensional vectors expressed in the same coordinate system, the rotational part first, like the spatial vectors of Drake (https://drake.mit.edu/doxygen_cxx/group__multibody__spatial__vectors.html), Modern Robotics (Lynch and Park, Cambridge University Press, 2017, sections 3.3.2 and 3.4) and Featherstone (Rigid Body Dynamics Algorithms, Springer, 2008).
Each part is a tensor with a unit of its own, e.g. an angular velocity and a velocity, so that the operations of tensors check them. The spatial vector DerivedT_ that derives from it, in the curiously recurring template pattern (CRTP), defines the tags: FrameT, PointT and ExpressedInT, and for motion vectors MeasuredInT. Spatial vectors are added, subtracted and compared, with operator+, operator-, operator==, operator!= and isApprox(), only if all their tags match, and fail otherwise with "Measured-in frames do not match.", "Frames do not match.", "Reference points do not match." or "Coordinate systems do not
match.". The spatial vectors combine spatial vectors with other tags with their shift() and compositions, e.g. SpatialVelocity::composeWithMovingFrameVelocity(). A passive rotation or a passive proper rigid transformation re-expresses a spatial vector about the same point, through the TransformationTraits of this header, and adjoint() maps spatial velocities and spatial forces by a passive proper rigid transformation. AnySpatialVector tells whether a type is a spatial vector. The destructor is protected and not virtual, like that of Transformation: spatial vectors are values, which are never deleted through a pointer to this class. A declared destructor suppresses the implicit moves, so the copies and the moves are defaulted too: a moved spatial vector moves its parts instead of copying them, which would allocate with e.g. Blitz++.
Definition at line 77 of file SpatialVector.hpp.
template<typename DerivedT_, AnyTensor RotationalT_, AnyTensor TranslationalT_>
template<typename OtherT_, typename RotationalOtherT_, typename TranslationalOtherT_>
Whether both spatial vectors, which must have the same tags, are approximately equal: their rotational and their translational parts are compared separately, like tensors (see Tensor::isApprox()), so that the units of one part do not weigh against those of the other.
Like the comparison of tensors, it is relative, so a part cannot be compared with zero: only zero is approximately equal to zero.
Definition at line 107 of file SpatialVector.hpp.