RobWorkProject
23.9.11-
|
A 2x2 rotation matrix \( \mathbf{R}\in SO(2) \). More...
#include <Rotation2D.hpp>
Public Types | |
typedef T | value_type |
Value type. | |
typedef Eigen::Rotation2D< T > | EigenMatrix2x2 |
The type of the internal Eigen matrix implementation. | |
Public Member Functions | |
Rotation2D () | |
A rotation matrix with uninitialized storage. | |
Rotation2D (T r11, T r12, T r21, T r22) | |
Constructs an initialized 2x2 rotation matrix. More... | |
Rotation2D (const rw::math::Vector2D< T > &i, const rw::math::Vector2D< T > &j) | |
Constructs an initialized 2x2 rotation matrix \( \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{i}} & \robabx{a}{b}{\mathbf{j}} \end{array} \right] \). More... | |
Rotation2D (const T theta) | |
Constructs an initialized 2x2 rotation matrix \( \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{i}} & \robabx{a}{b}{\mathbf{j}} \end{array} \right] \). More... | |
Rotation2D (const rw::math::Vector2D< T > &i) | |
Construct an initialized 2x2 rotation matrix. More... | |
template<class R > | |
Rotation2D (const EigenMatrix2x2 &m) | |
Construct a rotation matrix from an Eigen matrix. | |
T & | operator() (size_t row, size_t column) |
Returns reference to matrix element. More... | |
const T & | operator() (size_t row, size_t column) const |
Returns reference to matrix element. More... | |
bool | operator== (const Rotation2D< T > &rhs) const |
Comparison operator. More... | |
bool | operator!= (const Rotation2D< T > &rhs) const |
Comparison operator. More... | |
EigenMatrix2x2 | e () const |
Returns a Eigen 2x2 matrix \( \mathbf{M}\in SO(2) \) that represents this rotation. More... | |
const Rotation2D | operator* (const Rotation2D &bRc) const |
Calculates \( \robabx{a}{c}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{R}} \) where this object is \( \robabx{a}{b}{\mathbf{R}} \). More... | |
const rw::math::Vector2D< T > | operator* (const rw::math::Vector2D< T > &bVc) const |
Calculates \( \robabx{a}{c}{\mathbf{v}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{v}} \) where this object is \( \robabx{a}{b}{\mathbf{R}} \). More... | |
Static Public Member Functions | |
static const Rotation2D | identity () |
Constructs a 2x2 rotation matrix set to identity. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Rotation2D &r) |
Writes rotation matrix to stream. More... | |
Related Functions | |
(Note that these are not member functions.) | |
template<class T > | |
const Rotation2D< T > | inverse (const Rotation2D< T > &aRb) |
The inverse \( \robabx{b}{a}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}}^{-1} \) of a rotation matrix. More... | |
template<> | |
void | write (const rw::math::Rotation2D< double > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) |
template<> | |
void | write (const rw::math::Rotation2D< float > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) |
template<> | |
void | read (rw::math::Rotation2D< double > &sobject, rw::common::InputArchive &iarchive, const std::string &id) |
template<> | |
void | read (rw::math::Rotation2D< float > &sobject, rw::common::InputArchive &iarchive, const std::string &id) |
template<class Archive , class T > | |
void | serialize (Archive &archive, rw::math::Rotation2D< T > &R, const unsigned int version) |
Boost serialization. More... | |
A 2x2 rotation matrix \( \mathbf{R}\in SO(2) \).
\( \mathbf{R}= \left[ \begin{array}{cc} {}^A\hat{X}_B & {}^A\hat{Y}_B \end{array} \right] = \left[ \begin{array}{cc} r_{11} & r_{12} \\ r_{21} & r_{22} \end{array} \right] \)
|
inline |
Constructs an initialized 2x2 rotation matrix.
r11 | \( r_{11} \) |
r12 | \( r_{12} \) |
r21 | \( r_{21} \) |
r22 | \( r_{22} \) |
\( \mathbf{R} = \left[ \begin{array}{cc} r_{11} & r_{12} \\ r_{21} & r_{22} \end{array} \right] \)
|
inline |
Constructs an initialized 2x2 rotation matrix \( \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{i}} & \robabx{a}{b}{\mathbf{j}} \end{array} \right] \).
i | \( \robabx{a}{b}{\mathbf{i}} \) |
j | \( \robabx{a}{b}{\mathbf{j}} \) |
|
inline |
Constructs an initialized 2x2 rotation matrix \( \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{i}} & \robabx{a}{b}{\mathbf{j}} \end{array} \right] \).
theta |
|
inline |
Construct an initialized 2x2 rotation matrix.
The second of column of the matrix is deduced from the first column.
i | [in] The first column of the rotation matrix. |
|
inline |
Returns a Eigen 2x2 matrix \( \mathbf{M}\in SO(2) \) that represents this rotation.
|
inlinestatic |
Constructs a 2x2 rotation matrix set to identity.
\( \mathbf{R} = \left[ \begin{array}{cc} 1 & 0\\ 0 & 1 \end{array} \right] \)
|
inline |
Comparison operator.
The comparison operator makes a element wise comparison. Returns true if any of the elements are different.
rhs | [in] Rotation2D to compare with |
|
inline |
Returns reference to matrix element.
row | [in] row |
column | [in] column |
|
inline |
Returns reference to matrix element.
row | [in] row |
column | [in] column |
|
inline |
Calculates \( \robabx{a}{c}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{R}} \) where this object is \( \robabx{a}{b}{\mathbf{R}} \).
bRc | [in] \( \robabx{b}{c}{\mathbf{R}} \) |
|
inline |
Calculates \( \robabx{a}{c}{\mathbf{v}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{v}} \) where this object is \( \robabx{a}{b}{\mathbf{R}} \).
bVc | [in] \( \robabx{b}{c}{\mathbf{v}} \) |
|
inline |
Comparison operator.
The comparison operator makes a element wise comparison. Returns true only if all elements are equal.
rhs | [in] Rotation2D to compare with |
|
related |
The inverse \( \robabx{b}{a}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}}^{-1} \) of a rotation matrix.
aRb | [in] the rotation matrix \( \robabx{a}{b}{\mathbf{R}} \) |
\( \robabx{b}{a}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}}^{-1} = \robabx{a}{b}{\mathbf{R}}^T \)
|
friend |
Writes rotation matrix to stream.
os | [in/out] output stream to use |
r | [in] rotation matrix to print |
|
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 |
Boost serialization.
archive | [in] the boost archive to read from or write to. |
R | [in/out] the rotation matrix to read/write. |
version | [in] class version (currently version 0). |
|
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. |