ROBOOP::Quaternion Class Reference#include <quaternion.h>
List of all members.
Detailed Description
Quaternion class definition.
Definition at line 82 of file quaternion.h.
Constructor & Destructor Documentation
ROBOOP::Quaternion::Quaternion |
( |
|
) |
|
|
ROBOOP::Quaternion::Quaternion |
( |
const Quaternion & |
q |
) |
|
|
ROBOOP::Quaternion::Quaternion |
( |
const Real |
angle_in_rad, |
|
|
const ColumnVector & |
axis |
|
) |
|
|
ROBOOP::Quaternion::Quaternion |
( |
const Real |
s, |
|
|
const Real |
v1, |
|
|
const Real |
v2, |
|
|
const Real |
v3 |
|
) |
|
|
ROBOOP::Quaternion::Quaternion |
( |
const Matrix & |
R |
) |
|
|
|
Constructor.
Cite_: Dam. The unit quaternion obtained from a matrix (see Quaternion::R())
First we find :
Now the other values are:
The sign of cannot be determined. Depending on the choice of the sign for s the sign of change as well. Thus the quaternions and represent the same rotation, but the interpolation curve changed with the choice of the sign. A positive sign has been chosen.
Definition at line 117 of file quaternion.cpp. |
Member Function Documentation
Quaternion ROBOOP::Quaternion::conjugate |
( |
|
) |
const |
|
|
Conjugate.
The conjugate of a quaternion is
Definition at line 325 of file quaternion.cpp.
Referenced by i(). |
|
Quaternion time derivative.
The quaternion time derivative, quaternion propagation equation, is
where is the angular velocity vector expressed in the base frame. If the vector is expressed in the object frame, , the time derivative becomes
Definition at line 430 of file quaternion.cpp.
Referenced by ROBOOP::Impedance::control(). |
ReturnMatrix ROBOOP::Quaternion::E |
( |
const short |
sign |
) |
const |
|
Real ROBOOP::Quaternion::norm |
( |
|
) |
const |
|
|
Return the quaternion norm.
The norm of quaternion is defined by
Definition at line 340 of file quaternion.cpp.
Referenced by i(), and unit(). |
|
Overload * operator, multiplication by a scalar.
and let . Then ![$rq = qr = [r, 0][s, v] = [rs, rv]$](form_145.png)
The result is not necessarily a unit quaternion even if is a unit quaternions.
Definition at line 272 of file quaternion.cpp. |
|
Overload * operator.
The multiplication of two quaternions is
where and denote the scalar and vector product in respectively.
If and are unit quaternions, then q will also be a unit quaternion.
Definition at line 249 of file quaternion.cpp. |
|
Overload + operator.
The quaternion addition is
The result is not necessarily a unit quaternion even if and are unit quaternions.
Definition at line 209 of file quaternion.cpp. |
|
Overload - operator.
The quaternion soustraction is
The result is not necessarily a unit quaternion even if and are unit quaternions.
Definition at line 229 of file quaternion.cpp. |
|
Overload / operator, division by a scalar.
Same explanation as multiplication by scaler.
Definition at line 302 of file quaternion.cpp. |
Real ROBOOP::Quaternion::s |
( |
|
) |
const [inline] |
|
void ROBOOP::Quaternion::set_s |
( |
const Real |
s |
) |
[inline] |
|
Member Data Documentation
|
Quaternion scalar part.
Definition at line 121 of file quaternion.h.
Referenced by conjugate(), dot(), exp(), Log(), norm(), operator *(), operator+(), operator-(), operator/(), operator=(), Quaternion(), R(), T(), and unit(). |
|
Quaternion vector part.
Definition at line 122 of file quaternion.h.
Referenced by conjugate(), dot(), exp(), Log(), norm(), operator *(), operator+(), operator-(), operator/(), operator=(), Quaternion(), R(), set_v(), T(), and unit(). |
The documentation for this class was generated from the following files:
|