A class for representing Roll-Pitch-Yaw Euler angle rotations.
More...
#include <RPY.hpp>
Inherits Rotation3DVector< double >.
template<class T = double>
class rw::math::RPY< T >
A class for representing Roll-Pitch-Yaw Euler angle rotations.
◆ RPY() [1/2]
RPY |
( |
T |
roll, |
|
|
T |
pitch, |
|
|
T |
yaw |
|
) |
| |
|
inline |
Constructs an initialized roll-pitch-yaw euler angle vector.
- Parameters
-
roll | Rotation around z |
pitch | Rotation around y |
yaw | Rotation around x |
◆ RPY() [2/2]
Constructs an RPY object initialized according to the specified Rotation3D.
\( \beta = arctan2(-r_{31},\sqrt{r_{11}^2+r_{21}^2}) \) \( \alpha = arctan2(r_{21}/cos(\beta), r_{11}/cos(\beta)) \) \( \beta = arctan2(r_{32}/cos(\beta), r_{33}/cos(\beta))) \)
- Parameters
-
R | [in] A 3x3 rotation matrix \( \mathbf{R} \) |
epsilon | [in] Value specifying the value for which \( cos(\beta)\) is assumed 0 and the special case solution assuming \(\alpha=0, \beta=\pi/2 and \gamma = arctan2(r_{21}, r_{22})\) is to be used. |
◆ operator!=()
bool operator!= |
( |
const RPY< T > & |
rhs | ) |
const |
|
inline |
Comparison operator.
The comparison operator makes a element wise comparison. Returns true if any of the elements are different.
- Parameters
-
rhs | [in] RPY to compare with |
- Returns
- True if not equal.
◆ operator()() [1/2]
T& operator() |
( |
size_t |
index | ) |
|
|
inline |
Returns reference to the element.
- Parameters
-
index | [in] index of element |
- Returns
- reference to the element
◆ operator()() [2/2]
const T& operator() |
( |
size_t |
index | ) |
const |
|
inline |
Returns a const reference the an element.
- Parameters
-
index | [in] index of element |
- Returns
- const reference to the element
◆ operator==()
bool operator== |
( |
const RPY< T > & |
rhs | ) |
const |
|
inline |
Comparison operator.
The comparison operator makes a element wise comparison. Returns true only if all elements are equal.
- Parameters
-
rhs | [in] RPY to compare with |
- Returns
- True if equal.
◆ operator[]() [1/2]
T& operator[] |
( |
size_t |
i | ) |
|
|
inline |
Returns reference to the element.
- Parameters
-
- Returns
- reference to the element
◆ operator[]() [2/2]
const T& operator[] |
( |
size_t |
i | ) |
const |
|
inline |
Returns a const reference the an element.
- Parameters
-
- Returns
- const reference to the element
◆ size()
size of this RPY.
- Returns
- the value 3
◆ toRotation3D()
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const RPY< T > & |
rpy |
|
) |
| |
|
friend |
Ouputs RPY to stream.
- Parameters
-
os | [in/out] stream to use |
rpy | [in] rpy rotation |
- Returns
- the resulting stream
◆ read() [1/2]
Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.
- Parameters
-
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. |
- Note
- the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.
◆ read() [2/2]
Enable read-serialization of class T by overloading this method. Data is read from iarchive and filled into sobject.
- Parameters
-
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. |
- Note
- the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.
◆ write() [1/2]
Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.
- Parameters
-
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. |
- Note
- the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.
◆ write() [2/2]
Enable write-serialization of class T by overloading this method. Data is written to oarchive from the sobject.
- Parameters
-
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. |
- Note
- the id can be empty in which case the overloaded method should provide a default identifier. E.g. the Vector3D class defined "Vector3D" as its default id.
The documentation for this class was generated from the following files: