Class SpatialVelocity#
Defined in File SpatialVector.h
Inheritance Relationships#
Base Type#
public Karana::Math::SpatialVector(Class SpatialVector)
Class Documentation#
-
class SpatialVelocity : public Karana::Math::SpatialVector#
A velocity SpatialVector.
Public Functions
-
SpatialVelocity(const SpatialVelocity &other)#
Copy constructor.
- Parameters:
other – The SpatialVelocity to copy from.
-
SpatialVelocity &operator=(const SpatialVelocity &other)#
Copy assignment operator.
- Parameters:
other – The SpatialVelocity to assign from.
- Returns:
Reference to this object.
-
template<class Derived>
inline SpatialVelocity &operator=(const Eigen::MatrixBase<Derived> &expression)# Copy assignment operator.
- Template Parameters:
Derived – The derived Eigen type.
- Parameters:
expression – The Eigen expression to copy into the SpatialVelocity.
- Returns:
A reference to this SpatialVelocity.
-
SpatialVelocity(SpatialVelocity &&other) noexcept#
Move constructor.
- Parameters:
other – The SpatialVelocity to move from.
-
SpatialVelocity &operator=(SpatialVelocity &&other) noexcept#
Move assignment operator.
- Parameters:
other – The SpatialVelocity to move from.
- Returns:
Reference to this object.
-
SpatialVelocity operator*(double scale) const#
Scalar multiplication.
- Parameters:
scale – Scalar value to multiply by.
- Returns:
Scaled SpatialVelocity.
-
SpatialVelocity operator+(const SpatialVelocity &other) const#
Component-wise addition.
- Parameters:
other – The SpatialVelocity to add to this one.
- Returns:
Resulting SpatialVelocity sum.
-
SpatialVelocity &operator+=(const SpatialVelocity &other)#
In-place component-wise addition.
- Parameters:
other – The SpatialVelocity to add to this one in-place.
- Returns:
Reference to this object.
-
SpatialVelocity operator-() const#
Negation operator.
- Returns:
Negated SpatialVelocity.
-
SpatialVelocity operator-(const SpatialVelocity &other) const#
Subtract another SpatialVelocity.
- Parameters:
other – The SpatialVelocity to subtract from this one.
- Returns:
Resulting SpatialVelocity.
-
SpatialVelocity &operator-=(const SpatialVelocity &other)#
In-place subtraction.
- Parameters:
other – The SpatialVelocity to subtract from this one.
- Returns:
Reference to this object.
-
SpatialVelocity operator+(const Vec6 &vec) const#
Add a Vec6 to this spatial velocity.
- Parameters:
vec – The 6D velocity to add to this SpatialVelocity.
- Returns:
Resulting SpatialVelocity.
-
SpatialVelocity operator-(const Vec6 &vec) const#
Subtract a Vec6 from this spatial velocity.
- Parameters:
vec – The 6D velocity to subtract from this SpatialVelocity.
- Returns:
Resulting SpatialVelocity.
-
SpatialVelocity cross(const SpatialVelocity &other)#
Compute 6-D cross product with another spatial velocity.
\[\begin{split} A \times B = \tilde A B = \begin{bmatrix} \tilde A_w & \tilde A_v \\ 0 & \tilde A_w \end{bmatrix} \begin{bmatrix} B_w \\ B_v \end{bmatrix} \end{split}\]- Parameters:
other – The SpatialVelocity to compute the cross product with.
- Returns:
Resulting SpatialVelocity.
-
SpatialVelocity barprod(const SpatialVelocity &other)#
Compute the bar product with another spatial velocity.
\[\begin{split} \bar A B = - {\tilde A}^* B = \begin{bmatrix} \tilde A_w & \tilde A_v \\ 0 & \tilde A_w \end{bmatrix} \begin{bmatrix} B_w \\ B_v \end{bmatrix} \end{split}\]- Parameters:
other – The SpatialVelocity to compute the bar product with.
- Returns:
Resulting SpatialVelocity.
-
SpatialVelocity multiplyFromLeft(const Mat66 &mat) const#
Multiply the velocity from left with a matrix, i.e v * mat.
- Parameters:
mat – Matrix to multiply.
- Returns:
Resulting SpatialVelocity.
-
SpatialVector()#
Construct initialized to zero.
-
template<typename Derived>
inline explicit SpatialVector(const Eigen::MatrixBase<Derived> &sv)# Construct using a 6 vector. The first 3 components will be put into w and the last 3 components will be put into v.
- Template Parameters:
Derived – The derived Eigen type.
- Parameters:
sv – The Eigen expression to copy into the SpatialVector. This should be a 6-element vector.
-
template<typename WDerived, typename VDerived>
inline explicit SpatialVector(const Eigen::MatrixBase<WDerived> &w, const Eigen::MatrixBase<VDerived> &v)# Construct using two 3-element vectors. The first will become w and the second will become v.
- Template Parameters:
WDerived – The derived eigen type for w.
VDerived – The derived eigen type for v.
- Parameters:
w – Angular portion of the spatial vector.
v – Linear portion of the spatial vector.
-
SpatialVector(const SpatialVector &other)#
Copy constructor.
- Parameters:
other – The SpatialVector to copy from.
-
SpatialVector(SpatialVector &&other) noexcept#
Move constructor.
- Parameters:
other – The SpatialVector to move from.
-
SpatialVelocity(const SpatialVelocity &other)#