![]()  | 
  
    RobWorkProject
    23.9.11-
    
   | 
 
A class for representing an equivalent angle-axis rotation. More...
#include <EAA.hpp>
Inherits Rotation3DVector< double >.
Public Member Functions | |
| EAA (const rw::math::Rotation3D< T > &R) | |
| Extracts Equivalent axis-angle vector from Rotation matrix.  More... | |
| EAA () | |
| Constructs an EAA vector initialized to \(\{0,0,0\}\).  | |
| EAA (const rw::math::Vector3D< T > &axis, T angle) | |
| Constructs an initialized EAA vector.  More... | |
| EAA (T thetakx, T thetaky, T thetakz) | |
| Constructs an initialized EAA vector \( \thetak = \left[\begin{array}{c} \theta k_x\\ \theta k_y\\ \theta k_z \end{array}\right] \).  More... | |
| EAA (const rw::math::Vector3D< T > &v1, const rw::math::Vector3D< T > &v2) | |
| Constructs an EAA vector that will rotate v1 into v2. Where v1 and v2 are normalized and described in the same reference frame.  More... | |
| EAA (rw::math::Vector3D< T > eaa) | |
| Constructs an initialized EAA vector.  More... | |
| EAA (const rw::math::EAA< T > &eaa) | |
| Copy Constructor.  More... | |
| template<class R > | |
| EAA (const Eigen::MatrixBase< R > &r) | |
| Constructs an initialized EAA vector from rotation matrix.  More... | |
| virtual | ~EAA () | 
| destructor  | |
| size_t | size () const | 
| Get the size of the EAA.  More... | |
| virtual const rw::math::Rotation3D< T > | toRotation3D () const | 
| Returns the corresponding \( 3\times 3 \) Rotation matrix.  More... | |
| T | angle () const | 
| Extracts the angle of rotation \( \theta \).  More... | |
| EAA< T > & | setAngle (const T &angle) | 
| change the angle of the EAA  More... | |
| const rw::math::Vector3D< T > | axis () const | 
| Extracts the axis of rotation vector \( \mathbf{\hat{\mathbf{k}}} \).  More... | |
| rw::math::Vector3D< T > & | toVector3D () | 
| get the underling Vector  More... | |
| rw::math::Vector3D< T > | toVector3D () const | 
| get the underling Vector  More... | |
| Eigen::Matrix< T, 3, 1 > & | e () | 
| get as eigen vector  More... | |
| Eigen::Matrix< T, 3, 1 > | e () const | 
| get as eigen vector  More... | |
| const T & | operator[] (size_t i) const | 
| Returns element of EAA.  More... | |
| T & | operator[] (size_t i) | 
| Returns element of EAA.  More... | |
| const T & | operator() (size_t i) const | 
| Returns element of EAA.  More... | |
| T & | operator() (size_t i) | 
| Returns element of EAA.  More... | |
| template<class R > | |
| EAA< T > | elemDivide (const Eigen::MatrixBase< R > &rhs) const | 
| element wise division.  More... | |
| template<class R > | |
| EAA< T > | elemMultiply (const Eigen::MatrixBase< R > &rhs) const | 
| Elementweise multiplication.  More... | |
| template<class R > | |
| EAA< T > | operator- (const Eigen::MatrixBase< R > &rhs) const | 
| Vector subtraction.  | |
| template<class R > | |
| EAA< T > | operator+ (const Eigen::MatrixBase< R > &rhs) const | 
| Vector addition.  | |
| EAA< T > | operator- () const | 
| Unary minus.  More... | |
| EAA< T > | elemAdd (const EAA< T > &rhs) const | 
| element wise addition  More... | |
| EAA< T > | elemSubtract (const EAA< T > &rhs) const | 
| element wise subtraction  More... | |
| EAA< T > | elemDivide (const EAA< T > &rhs) const | 
| element wise devision ( this / rhs )  More... | |
| EAA< T > | elemMultiply (const EAA< T > &rhs) const | 
| element wise multiplication  More... | |
| EAA< T > | operator* (const EAA< T > &rhs) const | 
| This is rotation multiplcation, and it is multiplication of two EAA's first converted to a Rotation3D.  More... | |
| template<class R > | |
| EAA< T > | operator* (const rw::math::Rotation3D< R > &rhs) | 
| matrix multiplication converting EAA to rotation  More... | |
| EAA< T > | elemMultiply (const T &rhs) const | 
| scalar multiplication  More... | |
| EAA< T > | elemDivide (const T &rhs) const | 
| scalar devision  More... | |
| EAA< T > | elemSubtract (const T rhs) const | 
| Scalar subtraction.  | |
| EAA< T > | elemAdd (const T rhs) const | 
| Scalar addition.  | |
| EAA< T > | scaleAngle (const T &scale) | 
| scale the angle, keeping the axis the same  More... | |
| EAA< T > | operator+ (const rw::math::Vector3D< T > &rhs) const | 
| element wise multiplication.  More... | |
| EAA< T > | operator- (const rw::math::Vector3D< T > &rhs) const | 
| Vector addition.  More... | |
| EAA< T > | elemDivide (const rw::math::Vector3D< T > &rhs) const | 
| element wise devision ( this / rhs )  More... | |
| EAA< T > | elemMultiply (const rw::math::Vector3D< T > &rhs) const | 
| element wise multiplication  More... | |
| rw::math::Vector3D< T > | cross (const rw::math::Vector3D< T > &v) const | 
| Calculates the cross product and returns the result.  More... | |
| EAA< T > | cross (const EAA< T > &eaa) const | 
| Calculates the cross product and returns the result.  More... | |
| T | dot (const rw::math::Vector3D< T > &v) | 
| Calculates the dot product and returns the result.  More... | |
| T | dot (const EAA< T > &eaa) | 
| Calculates the cross product and returns the result.  More... | |
| T | norm2 () const | 
| Returns the Euclidean norm (2-norm) of the vector.  More... | |
| T | norm1 () const | 
| Returns the Manhatten norm (1-norm) of the vector.  More... | |
| T | normInf () const | 
| Returns the infinte norm ( \(\inf\)-norm) of the vector.  More... | |
| EAA< T > & | operator= (const EAA< T > &rhs) | 
| copy operator  More... | |
| EAA< T > & | operator= (const rw::math::Vector3D< T > &rhs) | 
| assign vector to EAA  More... | |
| EAA< T > & | operator+= (const rw::math::Vector3D< T > &rhs) | 
| addition operator  More... | |
| EAA< T > & | operator-= (const rw::math::Vector3D< T > &rhs) | 
| subtraction operator  More... | |
| operator rw::math::Vector3D< T > () const | |
| Implicit converter to Vector3D.  | |
| operator rw::math::Vector3D< T > & () | |
| Implicit converter to Vector3D.  | |
| template<class R > | |
| EAA< T > & | operator= (const Eigen::MatrixBase< R > &r) | 
| copy a vector from eigen type  More... | |
| template<class R > | |
| EAA< T > & | operator+= (const Eigen::MatrixBase< R > &r) | 
| Vector addition.  | |
| template<class R > | |
| EAA< T > & | operator-= (const Eigen::MatrixBase< R > &r) | 
| Vector subtraction.  | |
| operator Eigen::Matrix< T, 3, 1 > () const | |
| implicit conversion to EigenVector  | |
| operator Eigen::Matrix< T, 3, 1 > & () | |
| implicit conversion to EigenVector  | |
| EAA< T > & | operator= (const rw::math::Rotation3D< T > &rhs) | 
| copy operator  More... | |
| bool | operator== (const rw::math::Vector3D< T > &rhs) const | 
| Compare with rhs for equality.  More... | |
| bool | operator!= (const rw::math::Vector3D< T > &rhs) const | 
| Compare with rhs for inequality.  More... | |
| bool | operator== (const EAA< T > &rhs) const | 
| Compare with rhs for equality.  More... | |
| bool | operator!= (const EAA< T > &rhs) const | 
| Compare with rhs for inequality.  More... | |
| template<class R > | |
| bool | operator== (const Eigen::MatrixBase< R > &rhs) const | 
| Compare with rhs for equality.  More... | |
| template<class R > | |
| bool | operator!= (const Eigen::MatrixBase< R > &rhs) const | 
| Compare with rhs for inequality.  More... | |
  Public Member Functions inherited from Rotation3DVector< double > | |
| virtual | ~Rotation3DVector () | 
| Virtual destructor.  | |
Friends | |
| template<class R > | |
| EAA< T > | operator- (const Eigen::MatrixBase< R > &lhs, const EAA< T > &rhs) | 
| Vector subtraction.  | |
| template<class R > | |
| EAA< T > | operator+ (const Eigen::MatrixBase< R > &lhs, const EAA< T > &rhs) | 
| Vector subtraction.  | |
| EAA< T > | operator* (const rw::math::Rotation3D< T > &aRb, const EAA< T > &bTKc) | 
| Calculates \( \robabx{a}{c}{\thetak} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{\thetak}} \).  More... | |
| EAA< T > | operator+ (const rw::math::Vector3D< T > &lhs, const EAA< T > &rhs) | 
| Vector addition.  More... | |
| EAA< T > | operator- (const rw::math::Vector3D< T > &lhs, const EAA< T > &rhs) | 
| Vector addition.  More... | |
| std::ostream & | operator<< (std::ostream &os, const EAA< T > &eaa) | 
| Ouputs EAA to stream.  More... | |
| bool | operator== (const rw::math::Vector3D< T > &lhs, const EAA< T > &rhs) | 
| Compare with rhs for equality.  More... | |
| bool | operator!= (const rw::math::Vector3D< T > &lhs, const EAA< T > &rhs) | 
| Compare with rhs for inequality.  More... | |
| template<class R > | |
| bool | operator== (const Eigen::MatrixBase< R > &lhs, const EAA< T > &rhs) | 
| Compare with rhs for equality.  More... | |
| template<class R > | |
| bool | operator!= (const Eigen::MatrixBase< R > &lhs, const EAA< T > &rhs) | 
| Compare with rhs for inequality.  More... | |
Related Functions | |
(Note that these are not member functions.)  | |
| template<> | |
| void | write (const rw::math::EAA< double > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) | 
| template<> | |
| void | write (const rw::math::EAA< float > &sobject, rw::common::OutputArchive &oarchive, const std::string &id) | 
| template<> | |
| void | read (rw::math::EAA< double > &sobject, rw::common::InputArchive &iarchive, const std::string &id) | 
| template<> | |
| void | read (rw::math::EAA< float > &sobject, rw::common::InputArchive &iarchive, const std::string &id) | 
Additional Inherited Members | |
  Protected Member Functions inherited from Rotation3DVector< double > | |
| Rotation3DVector (const Rotation3DVector &) | |
| Copy Constructor.  More... | |
| Rotation3DVector () | |
| Default Constructor.  | |
| Rotation3DVector & | operator= (const Rotation3DVector &) | 
| Assignment operator is protected to force subclasses to implement it by themself.  | |
A class for representing an equivalent angle-axis rotation.
This class defines an equivalent-axis-angle orientation vector also known as an \( \thetak \) vector or "axis+angle" vector
The equivalent-axis-angle vector is the product of a unit vector \( \hat{\mathbf{k}} \) and an angle of rotation around that axis \( \theta \)
      
  | 
  explicit | 
Extracts Equivalent axis-angle vector from Rotation matrix.
| R | [in] A 3x3 rotation matrix \( \mathbf{R} \) | 
\( \theta = arccos(\frac{1}{2}(Trace(\mathbf{R})-1)=arccos(\frac{r_{11}+r_{22}+r_{33}-1}{2}) \)
\( \thetak=log(\mathbf{R})=\frac{\theta}{2 sin \theta}(\mathbf{R}-\mathbf{R}^T) = \frac{\theta}{2 sin \theta} \left[ \begin{array}{c} r_{32}-r_{23}\\ r_{13}-r_{31}\\ r_{21}-r_{12} \end{array} \right] \)
\( \thetak= \left[ \begin{array}{c} 0\\ 0\\ 0 \end{array} \right] \) if \( \theta = 0 \)
\( \thetak=\pi \left[ \begin{array}{c} \sqrt{(R(0,0)+1.0)/2.0}\\ \sqrt{(R(1,1)+1.0)/2.0}\\ \sqrt{(R(2,2)+1.0)/2.0} \end{array} \right] \) if \( \theta = \pi \)
      
  | 
  inline | 
Constructs an initialized EAA vector.
| axis | [in] \( \mathbf{\hat{k}} \) | 
| angle | [in] \( \theta \) | 
      
  | 
  inline | 
Constructs an initialized EAA vector \( \thetak = \left[\begin{array}{c} \theta k_x\\ \theta k_y\\ \theta k_z \end{array}\right] \).
| thetakx | [in] \( \theta k_x \) | 
| thetaky | [in] \( \theta k_y \) | 
| thetakz | [in] \( \theta k_z \) | 
| EAA | ( | const rw::math::Vector3D< T > & | v1, | 
| const rw::math::Vector3D< T > & | v2 | ||
| ) | 
Constructs an EAA vector that will rotate v1 into v2. Where v1 and v2 are normalized and described in the same reference frame.
| v1 | [in] normalized vector | 
| v2 | [in] normalized vector | 
      
  | 
  inlineexplicit | 
      
  | 
  inline | 
Copy Constructor.
| eaa | [in] Values to initialize the EAA | 
      
  | 
  inlineexplicit | 
      
  | 
  inline | 
Extracts the angle of rotation \( \theta \).
      
  | 
  inline | 
Extracts the axis of rotation vector \( \mathbf{\hat{\mathbf{k}}} \).
Calculates the cross product and returns the result.
| eaa | [in] a EAA | 
      
  | 
  inline | 
Calculates the cross product and returns the result.
| v | [in] a Vector3D | 
      
  | 
  inline | 
Calculates the cross product and returns the result.
| eaa | [in] a EAA | 
      
  | 
  inline | 
Calculates the dot product and returns the result.
| v | [in] a Vector3D | 
      
  | 
  inline | 
get as eigen vector
      
  | 
  inline | 
get as eigen vector
element wise devision ( this / rhs )
| rhs | [in] the EAA to be devided with | 
      
  | 
  inline | 
element wise division.
| rhs | [in] the vector being devided with | 
      
  | 
  inline | 
element wise devision ( this / rhs )
| rhs | [in] the Vector to be devided with | 
      
  | 
  inline | 
element wise multiplication
| rhs | [in] the EAA to be multiplyed with | 
      
  | 
  inline | 
Elementweise multiplication.
| rhs | [in] vector | 
      
  | 
  inline | 
element wise multiplication
| rhs | [in] the Vector to be multiplyed with | 
      
  | 
  inline | 
scalar multiplication
| rhs | [in] the scalar to multiply with | 
      
  | 
  inline | 
Returns the Manhatten norm (1-norm) of the vector.
      
  | 
  inline | 
Returns the Euclidean norm (2-norm) of the vector.
      
  | 
  inline | 
Returns the infinte norm ( \(\inf\)-norm) of the vector.
      
  | 
  inline | 
Compare with rhs for inequality.
| rhs | [in] other vector. | 
      
  | 
  inline | 
Compare with rhs for inequality.
| rhs | [in] other vector. | 
      
  | 
  inline | 
Compare with rhs for inequality.
| rhs | [in] other vector. | 
      
  | 
  inline | 
      
  | 
  inline | 
This is rotation multiplcation, and it is multiplication of two EAA's first converted to a Rotation3D.
| rhs | [in] the eaa to multiply with | 
      
  | 
  inline | 
matrix multiplication converting EAA to rotation
| rhs | [in] the roation matrix to multiply with | 
      
  | 
  inline | 
element wise multiplication.
| rhs | [in] the vector being devided with | 
      
  | 
  inline | 
addition operator
| rhs | [in] the right hand side of the operation | 
      
  | 
  inline | 
Unary minus.
negative version
      
  | 
  inline | 
      
  | 
  inline | 
subtraction operator
| rhs | [in] the right hand side of the operation | 
      
  | 
  inline | 
copy a vector from eigen type
| r | [in] an Eigen Vector | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Compare with rhs for equality.
| rhs | [in] other vector. | 
      
  | 
  inline | 
Compare with rhs for equality.
| rhs | [in] other vector. | 
      
  | 
  inline | 
Compare with rhs for equality.
| rhs | [in] other vector. | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
scale the angle, keeping the axis the same
| scale | [in] how much the angle should change | 
      
  | 
  inline | 
      
  | 
  inline | 
Get the size of the EAA.
      
  | 
  virtual | 
Returns the corresponding \( 3\times 3 \) Rotation matrix.
\( \mathbf{R} = e^{[\mathbf{\hat{k}}],\theta}=\mathbf{I}^{3x3}+[\mathbf{\hat{k}}] sin\theta+[{\mathbf{\hat{k}}}]^2(1-cos\theta) = \left[ \begin{array}{ccc} k_xk_xv\theta + c\theta & k_xk_yv\theta - k_zs\theta & k_xk_zv\theta + k_ys\theta \\ k_xk_yv\theta + k_zs\theta & k_yk_yv\theta + c\theta & k_yk_zv\theta - k_xs\theta\\ k_xk_zv\theta - k_ys\theta & k_yk_zv\theta + k_xs\theta & k_zk_zv\theta + c\theta \end{array} \right] \)
where:
Implements Rotation3DVector< double >.
      
  | 
  inline | 
get the underling Vector
      
  | 
  inline | 
get the underling Vector
      
  | 
  friend | 
Compare with rhs for inequality.
| lhs | [in] first vector. | 
| rhs | [in] other vector. | 
      
  | 
  friend | 
Compare with rhs for inequality.
| lhs | [in] first Vector | 
| rhs | [in] second vector. | 
      
  | 
  friend | 
Calculates \( \robabx{a}{c}{\thetak} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{\thetak}} \).
| aRb | [in] \( \robabx{a}{b}{\mathbf{R}} \) | 
| bTKc | [in] \( \robabx{b}{c}{\thetak} \) | 
      
  | 
  friend | 
      
  | 
  friend | 
      
  | 
  friend | 
Ouputs EAA to stream.
| os | [in/out] stream to use | 
| eaa | [in] equivalent axis-angle | 
      
  | 
  friend | 
Compare with rhs for equality.
| lhs | [in] first vector. | 
| rhs | [in] other vector. | 
      
  | 
  friend | 
Compare with rhs for equality.
| lhs | [in] first Vector | 
| rhs | [in] second vector. | 
      
  | 
  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. |