RobWorkProject
24.8.23-
|
Class for representing 6 degrees of freedom velocity screws. More...
#include <VelocityScrew6D.hpp>
Public Member Functions | |
VelocityScrew6D (T vx, T vy, T vz, T wx, T wy, T wz) | |
Constructs a 6 degrees of freedom velocity screw. More... | |
template<class R > | |
VelocityScrew6D (const Eigen::MatrixBase< R > &v) | |
Construct from Eigen vector representation. More... | |
VelocityScrew6D () | |
Default Constructor. Initialized the velocity to 0. | |
VelocityScrew6D (const VelocityScrew6D &vs) | |
Copy Constructor. More... | |
VelocityScrew6D (const rw::math::Transform3D< T > &transform) | |
Constructs a velocity screw in frame \( a \) from a transform \(\robabx{a}{b}{\mathbf{T}} \). More... | |
VelocityScrew6D (const Vector3D< T > &linear, const EAA< T > &angular) | |
Constructs a velocity screw from a linear and angular velocity. More... | |
const Vector3D< T > | linear () const |
Extracts the linear velocity. More... | |
const EAA< T > | angular () const |
Extracts the angular velocity and represents it using an equivalent-angle-axis as \( \dot{\Theta}\mathbf{k} \). More... | |
size_t | size () const |
get the size of the underlying vector | |
T & | operator() (std::size_t index) |
Returns reference to velocity screw element. More... | |
const T & | operator() (std::size_t index) const |
Returns const reference to velocity screw element. More... | |
const T & | operator[] (size_t i) const |
Returns const reference to velocity screw element. More... | |
T & | operator[] (size_t i) |
Returns const reference to velocity screw element. More... | |
VelocityScrew6D< T > & | operator+= (const VelocityScrew6D< T > &screw) |
Adds the velocity screw given as a parameter to the velocity screw. More... | |
VelocityScrew6D< T > & | operator-= (const VelocityScrew6D< T > &screw) |
Subtracts the velocity screw given as a parameter from the velocity screw. More... | |
VelocityScrew6D< T > & | operator*= (T s) |
Scales velocity screw with s. More... | |
bool | operator== (const VelocityScrew6D< T > &rhs) const |
Comparison operator. More... | |
bool | operator!= (const VelocityScrew6D< T > &rhs) const |
Comparison operator. More... | |
const VelocityScrew6D< T > | operator* (T s) const |
Scales velocity screw and returns scaled version. More... | |
const VelocityScrew6D< T > | operator+ (const VelocityScrew6D< T > &screw2) const |
Adds two velocity screws together \( \mathbf{\nu}_{12}=\mathbf{\nu}_1+\mathbf{\nu}_2 \). More... | |
const VelocityScrew6D< T > | operator- (const VelocityScrew6D< T > &screw2) const |
Subtracts two velocity screws \(\mathbf{\nu}_{12}=\mathbf{\nu}_1-\mathbf{\nu}_2\). More... | |
T | norm1 () const |
Takes the 1-norm of the velocity screw. All elements both angular and linear are given the same weight. More... | |
T | norm2 () const |
Takes the 2-norm of the velocity screw. All elements both angular and linear are given the same weight. More... | |
T | normInf () const |
Takes the infinite norm of the velocity screw. All elements both angular and linear are given the same weight. More... | |
Eigen::Matrix< T, 6, 1 > | e () const |
Converter to Eigen vector. | |
Friends | |
const VelocityScrew6D< T > | operator* (T s, const VelocityScrew6D &screw) |
Scales velocity screw and returns scaled version. More... | |
const VelocityScrew6D< T > | operator* (const rw::math::Transform3D< T > &aTb, const VelocityScrew6D< T > &bV) |
Changes frame of reference and velocity referencepoint of velocityscrew: \( \robabx{b}{b}{\mathbf{\nu}}\to \robabx{a}{a}{\mathbf{\nu}} \). More... | |
const VelocityScrew6D< T > | operator* (const Vector3D< T > &aPqTop, const VelocityScrew6D< T > &bV) |
Changes velocity referencepoint of velocityscrew: \( \robabx{a}{q}{\mathbf{\nu}}\to \robabx{a}{p}{\mathbf{\nu}} \). More... | |
const VelocityScrew6D< T > | operator* (const Rotation3D< T > &aRb, const VelocityScrew6D< T > &bV) |
Changes frame of reference for velocityscrew: \( \robabx{b}{i}{\mathbf{\nu}}\to \robabx{a}{i}{\mathbf{\nu}} \). More... | |
std::ostream & | operator<< (std::ostream &os, const VelocityScrew6D< T > &screw) |
Ouputs velocity screw to stream. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<> | |
void | write (const rw::math::VelocityScrew6D< double > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) |
template<> | |
void | write (const rw::math::VelocityScrew6D< float > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) |
template<> | |
void | read (rw::math::VelocityScrew6D< double > &sobject, rw::common::InputArchive &iarchive, const std::string &id) |
template<> | |
void | read (rw::math::VelocityScrew6D< float > &sobject, rw::common::InputArchive &iarchive, const std::string &id) |
Class for representing 6 degrees of freedom velocity screws.
\[ \mathbf{\nu} = \left[ \begin{array}{c} v_x\\ v_y\\ v_z\\ \omega_x\\ \omega_y\\ \omega_z \end{array} \right] \]
A VelocityScrew is the description of a frames linear and rotational velocity with respect to some reference frame.
VelocityScrew6D | ( | T | vx, |
T | vy, | ||
T | vz, | ||
T | wx, | ||
T | wy, | ||
T | wz | ||
) |
Constructs a 6 degrees of freedom velocity screw.
vx | [in] \( v_x \) |
vy | [in] \( v_y \) |
vz | [in] \( v_z \) |
wx | [in] \( \omega_x \) |
wy | [in] \( \omega_y \) |
wz | [in] \( \omega_z \) |
|
inline |
Construct from Eigen vector representation.
v | [in] Eigen matrix with either one row or one column. |
|
inline |
Copy Constructor.
vs | [in] the velocityscrew6D to copy |
|
explicit |
Constructs a velocity screw in frame \( a \) from a transform \(\robabx{a}{b}{\mathbf{T}} \).
transform | [in] the corresponding transform. |
VelocityScrew6D | ( | const Vector3D< T > & | linear, |
const EAA< T > & | angular | ||
) |
Constructs a velocity screw from a linear and angular velocity.
linear | [in] linear velocity |
angular | [in] angular velocity |
|
inline |
Extracts the angular velocity and represents it using an equivalent-angle-axis as \( \dot{\Theta}\mathbf{k} \).
|
inline |
Extracts the linear velocity.
|
inline |
Takes the 1-norm of the velocity screw. All elements both angular and linear are given the same weight.
|
inline |
Takes the 2-norm of the velocity screw. All elements both angular and linear are given the same weight.
|
inline |
Takes the infinite norm of the velocity screw. All elements both angular and linear are given the same weight.
|
inline |
Comparison operator.
The comparison operator makes a element wise comparison. Returns true if any of the elements are different.
rhs | [in] VelocityScrew6D to compare with |
|
inline |
Returns reference to velocity screw element.
index | [in] index in the screw, index must be \( < 6 \). |
|
inline |
Returns const reference to velocity screw element.
index | [in] index in the screw, index must be \( < 6 \). |
|
inline |
Scales velocity screw and returns scaled version.
s | [in] scaling value |
|
inline |
Scales velocity screw with s.
s | [in] scaling value |
|
inline |
Adds two velocity screws together \( \mathbf{\nu}_{12}=\mathbf{\nu}_1+\mathbf{\nu}_2 \).
screw2 | [in] \( \mathbf{\nu}_2 \) |
|
inline |
Adds the velocity screw given as a parameter to the velocity screw.
screw | [in] Velocity screw to add |
|
inline |
Subtracts two velocity screws \(\mathbf{\nu}_{12}=\mathbf{\nu}_1-\mathbf{\nu}_2\).
screw2 | [in] \(\mathbf{\nu}_2\) |
|
inline |
Subtracts the velocity screw given as a parameter from the velocity screw.
screw | [in] Velocity screw to subtract |
|
inline |
Comparison operator.
The comparison operator makes a element wise comparison. Returns true only if all elements are equal.
rhs | [in] VelocityScrew6D to compare with |
|
inline |
Returns const reference to velocity screw element.
i | [in] index in the screw, index must be \( < 6 \). |
|
inline |
Returns const reference to velocity screw element.
i | [in] index in the screw, index must be \( < 6 \). |
|
friend |
Changes frame of reference for velocityscrew: \( \robabx{b}{i}{\mathbf{\nu}}\to \robabx{a}{i}{\mathbf{\nu}} \).
aRb | [in] the change in orientation between frame \( \mathcal{F}_a \) and frame \( \mathcal{F}_b \): \( \robabx{a}{b}{\mathbf{R}} \) |
bV | [in] velocity screw wrt. frame \( \mathcal{F}_b \): \( \robabx{b}{i}{\mathbf{\nu}} \) |
Transformation of the base to which the VelocityScrew is expressed. The velocity reference point is left intact
\[ \robabx{a}{i}{\mathbf{\nu}} = \left[ \begin{array}{c} \robabx{a}{i}{\mathbf{v}} \\ \robabx{a}{i}{\mathbf{\omega}} \end{array} \right] = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{R}} & \mathbf{0}^{3x3} \\ \mathbf{0}^{3x3} & \robabx{a}{b}{\mathbf{R}} \end{array} \right] \robabx{b}{i}{\mathbf{\nu}} = \left[ \begin{array}{c} \robabx{a}{b}{\mathbf{R}} \robabx{b}{i}{\mathbf{v}} \\ \robabx{a}{b}{\mathbf{R}} \robabx{b}{i}{\mathbf{\omega}} \end{array} \right] \]
|
friend |
Changes frame of reference and velocity referencepoint of velocityscrew: \( \robabx{b}{b}{\mathbf{\nu}}\to \robabx{a}{a}{\mathbf{\nu}} \).
The frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) are rigidly connected.
aTb | [in] the location of frame \( \mathcal{F}_b \) wrt. frame \( \mathcal{F}_a \): \( \robabx{a}{b}{\mathbf{T}} \) |
bV | [in] velocity screw wrt. frame \( \mathcal{F}_b \): \( \robabx{b}{b}{\mathbf{\nu}} \) |
Transformation of both the velocity reference point and of the base to which the VelocityScrew is expressed
\[ \robabx{a}{a}{\mathbf{\nu}} = \left[ \begin{array}{c} \robabx{a}{a}{\mathbf{v}} \\ \robabx{a}{a}{\mathbf{\omega}} \end{array} \right] = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{R}} & S(\robabx{a}{b}{\mathbf{p}}) \robabx{a}{b}{\mathbf{R}} \\ \mathbf{0}^{3x3} & \robabx{a}{b}{\mathbf{R}} \end{array} \right] \robabx{b}{b}{\mathbf{\nu}} = \left[ \begin{array}{c} \robabx{a}{b}{\mathbf{R}} \robabx{b}{b}{\mathbf{v}} + \robabx{a}{b}{\mathbf{p}} \times \robabx{a}{b}{\mathbf{R}} \robabx{b}{b}{\mathbf{\omega}}\\ \robabx{a}{b}{\mathbf{R}} \robabx{b}{b}{\mathbf{\omega}} \end{array} \right] \]
|
friend |
Changes velocity referencepoint of velocityscrew: \( \robabx{a}{q}{\mathbf{\nu}}\to \robabx{a}{p}{\mathbf{\nu}} \).
The vector should describe a translation from the current velocity reference point q to the wanted/new velocity reference point p seen from frame \( \mathcal{F}_a \)
aPqTop | [in] the translation from point q to point p seen in frame \( \mathcal{F}_a \) |
bV | [in] velocity screw wrt. frame \( \mathcal{F}_a \): \( \robabx{a}{q}{\mathbf{\nu}} \) |
Transformation of the velocity reference point
\[ \robabx{a}{p}{\mathbf{\nu}} = \left[ \begin{array}{c} \robabx{a}{p}{\mathbf{v}} \\ \robabx{a}{p}{\mathbf{\omega}} \end{array} \right] = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{R}} & S(\robabx{a}{b}{\mathbf{p}}) \robabx{a}{b}{\mathbf{R}} \\ \mathbf{0}^{3x3} & \robabx{a}{b}{\mathbf{R}} \end{array} \right] \robabx{a}{p}{\mathbf{\nu}} = \left[ \begin{array}{c} \robabx{a}{p}{\mathbf{v}} + \robabx{a}{qTop}{\mathbf{p}} \robabx{b}{b}{\mathbf{\omega}}\\ \robabx{a}{b}{\mathbf{R}} \robabx{b}{b}{\mathbf{\omega}} \end{array} \right] \]
|
friend |
Scales velocity screw and returns scaled version.
s | [in] scaling value |
screw | [in] Screw to scale |
|
friend |
Ouputs velocity screw to stream.
os | [in/out] stream to use |
screw | [in] velocity screw |
|
related |
Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.
sobject | [out] the object in which the data should be streamed into |
iarchive | [in] the InputArchive from which to read data. |
id | [in] The id of the serialized sobject. |
|
related |
Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.
sobject | [out] the object in which the data should be streamed into |
iarchive | [in] the InputArchive from which to read data. |
id | [in] The id of the serialized sobject. |
|
related |
Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.
sobject | [in] the object from which the data should be streamed. |
oarchive | [out] the OutputArchive in which data should be written. |
id | [in] The id of the serialized sobject. |
|
related |
Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.
sobject | [in] the object from which the data should be streamed. |
oarchive | [out] the OutputArchive in which data should be written. |
id | [in] The id of the serialized sobject. |