RobWorkProject
23.9.11-
|
Class for representing 6 degrees of freedom wrenches. More...
#include <Wrench6D.hpp>
Public Member Functions | |
Wrench6D (T fx, T fy, T fz, T tx, T ty, T tz) | |
Constructs a 6 degrees of freedom velocity screw. More... | |
template<class R > | |
Wrench6D (const Eigen::MatrixBase< R > &v) | |
Constructs based on Eigen data type. | |
Wrench6D () | |
Default Constructor. Initialized the wrench to 0. | |
Wrench6D (const rw::math::Vector3D< T > &force, const rw::math::Vector3D< T > &torque) | |
Constructs a wrench from a force and torque. More... | |
void | setForce (const rw::math::Vector3D< T > &force) |
Sets the force component. More... | |
void | setTorque (const rw::math::Vector3D< T > &torque) |
Sets the torque component. More... | |
const rw::math::Vector3D< T > | force () const |
Extracts the force. More... | |
const rw::math::Vector3D< T > | torque () const |
Extracts the torque and represents it using an Vector3D<T> More... | |
T & | operator() (std::size_t index) |
Returns reference to wrench element. More... | |
const T & | operator() (std::size_t index) const |
Returns const reference to wrench 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... | |
Wrench6D< T > & | operator+= (const Wrench6D< T > &wrench) |
Adds the wrench given as a parameter to the wrench. More... | |
Wrench6D< T > & | operator-= (const Wrench6D< T > &wrench) |
Subtracts the wrench given as a parameter from the wrench. More... | |
Wrench6D< T > & | operator*= (T s) |
Scales wrench with s. More... | |
const Wrench6D< T > | operator* (T s) const |
Scales wrench and returns scaled version. More... | |
const Wrench6D< T > | operator+ (const Wrench6D< T > &rhs) const |
Adds two wrenches together \( \mathbf{w}_{12}=\mathbf{w}_1+\mathbf{w}_2 \). More... | |
const Wrench6D< T > | operator- (const Wrench6D< T > &rhs) const |
Subtracts two velocity screws \(\mathbf{\nu}_{12}=\mathbf{\nu}_1-\mathbf{\nu}_2\). More... | |
T | norm1 () const |
Takes the 1-norm of the wrench. All elements both force and torque are given the same weight. More... | |
T | norm2 () const |
Takes the 2-norm of the wrench. All elements both force and torque are given the same weight. More... | |
T | normInf () const |
Takes the infinite norm of the wrench. All elements both force and torque are given the same weight. More... | |
Eigen::Matrix< T, 6, 1 > | e () const |
Converter to Eigen data type. | |
bool | operator== (const Wrench6D< T > &b) const |
Compares a and b for equality. More... | |
bool | operator!= (const Wrench6D< T > &b) const |
Compares a and b for inequality. More... | |
Friends | |
const Wrench6D< T > | operator* (const Transform3D< T > &aTb, const Wrench6D< T > &bV) |
Changes frame of reference and referencepoint of wrench: \( \robabx{b}{b}{\mathbf{w}}\to \robabx{a}{a}{\mathbf{w}} \). More... | |
const Wrench6D< T > | operator* (const rw::math::Vector3D< T > &aPb, const Wrench6D< T > &bV) |
Changes wrench referencepoint of wrench: \( \robabx{b}{b}{\mathbf{w}}\to \robabx{a}{a}{\mathbf{w}} \). More... | |
const Wrench6D< T > | operator* (const Rotation3D< T > &aRb, const Wrench6D< T > &bV) |
Changes frame of reference for wrench: \( \robabx{b}{i}{\mathbf{w}}\to \robabx{a}{i}{\mathbf{w}} \). More... | |
std::ostream & | operator<< (std::ostream &os, const Wrench6D< T > &wrench) |
Ouputs wrench to stream. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<> | |
void | write (const rw::math::Wrench6D< double > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) |
template<> | |
void | write (const rw::math::Wrench6D< float > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) |
template<> | |
void | read (rw::math::Wrench6D< double > &sobject, rw::common::InputArchive &iarchive, const std::string &id) |
template<> | |
void | read (rw::math::Wrench6D< float > &sobject, rw::common::InputArchive &iarchive, const std::string &id) |
Class for representing 6 degrees of freedom wrenches.
\[ \mathbf{\nu} = \left[ \begin{array}{c} f_x\\ f_y\\ f_z\\ \tau_x\\ \tau_y\\ \tau_z \end{array} \right] \]
A Wrench is the description of a frames linear force and rotational torque with respect to some reference frame.
Wrench6D | ( | T | fx, |
T | fy, | ||
T | fz, | ||
T | tx, | ||
T | ty, | ||
T | tz | ||
) |
Constructs a 6 degrees of freedom velocity screw.
fx | [in] \( f_x \) |
fy | [in] \( f_y \) |
fz | [in] \( f_z \) |
tx | [in] \( \tau_x \) |
ty | [in] \( \tau_y \) |
tz | [in] \( \tau_z \) |
Wrench6D | ( | const rw::math::Vector3D< T > & | force, |
const rw::math::Vector3D< T > & | torque | ||
) |
Constructs a wrench from a force and torque.
force | [in] linear force |
torque | [in] angular torque |
|
inline |
Extracts the force.
|
inline |
Takes the 1-norm of the wrench. All elements both force and torque are given the same weight.
|
inline |
Takes the 2-norm of the wrench. All elements both force and torque are given the same weight.
|
inline |
Takes the infinite norm of the wrench. All elements both force and torque are given the same weight.
|
inline |
Compares a and b for inequality.
b | [in] other wrench to compare with. |
|
inline |
Returns reference to wrench element.
index | [in] index in the wrench, index must be \( < 6 \). |
|
inline |
Returns const reference to wrench element.
index | [in] index in the wrench, index must be \( < 6 \). |
|
inline |
Scales wrench and returns scaled version.
s | [in] scaling value |
|
inline |
Scales wrench with s.
s | [in] scaling value |
Adds two wrenches together \( \mathbf{w}_{12}=\mathbf{w}_1+\mathbf{w}_2 \).
rhs | [in] \( \mathbf{\nu}_1 \) |
Adds the wrench given as a parameter to the wrench.
Assumes the wrenches are represented in the same coordinate system.
wrench | [in] Wrench to add |
Subtracts two velocity screws \(\mathbf{\nu}_{12}=\mathbf{\nu}_1-\mathbf{\nu}_2\).
rhs | [in] \(\mathbf{w}_1\) |
Subtracts the wrench given as a parameter from the wrench.
Assumes the wrenches are represented in the same coordinate system.
wrench | [in] Velocity screw to subtract |
|
inline |
Compares a and b for equality.
b | [in] other wrench 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 \). |
|
inline |
Sets the force component.
force | [in] linear force |
|
inline |
Sets the torque component.
torque | [in] angular torque |
|
inline |
Extracts the torque and represents it using an Vector3D<T>
|
friend |
Changes frame of reference for wrench: \( \robabx{b}{i}{\mathbf{w}}\to \robabx{a}{i}{\mathbf{w}} \).
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 wrench is expressed. The wrench reference point is left intact
\[ \robabx{a}{i}{\mathbf{w}} = \left[ \begin{array}{c} \robabx{a}{i}{\mathbf{force}} \\ \robabx{a}{i}{\mathbf{torque}} \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 wrench referencepoint of wrench: \( \robabx{b}{b}{\mathbf{w}}\to \robabx{a}{a}{\mathbf{w}} \).
The frames \( \mathcal{F}_a \) and \( \mathcal{F}_b \) are rigidly connected.
aPb | [in] the location of frame \( \mathcal{F}_b \) wrt. frame \( \mathcal{F}_a \): \( \robabx{a}{b}{\mathbf{T}} \) |
bV | [in] wrench wrt. frame \( \mathcal{F}_b \): \( \robabx{b}{b}{\mathbf{\nu}} \) |
Transformation of both the velocity reference point and of the base to which the wrench is expressed
\[ \robabx{a}{a}{\mathbf{w}} = \left[ \begin{array}{c} \robabx{a}{a}{\mathbf{force}} \\ \robabx{a}{a}{\mathbf{torque}} \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 frame of reference and referencepoint of wrench: \( \robabx{b}{b}{\mathbf{w}}\to \robabx{a}{a}{\mathbf{w}} \).
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] wrench wrt. frame \( \mathcal{F}_b \): \( \robabx{b}{b}{\mathbf{\nu}} \) |
Transformation of both the wrench reference point and of the base to which the wrench is expressed
\[ \robabx{a}{a}{\mathbf{w}} = \left[ \begin{array}{c} \robabx{a}{a}{\mathbf{force}} \\ \robabx{a}{a}{\mathbf{torque}} \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 |
Ouputs wrench to stream.
os | [in/out] stream to use |
wrench | [in] the wrench |
|
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. |