Class RotationVector#
Defined in File RotationVector.h
Class Documentation#
-
class RotationVector#
The (n * theta) Rotation Vector attitude representation minical coordinate representation for orientations, where n is a unit vector, and theta is an angle. See.
Attitude and pose representations section for more discussion on attitude representations.
It is recommended that the angle be in [0, PI] range to preserve 1-1 mapping in the space of orientations, and to stay from singularities at multiples of 2*PI. There is however no angle range restriction imposed in this class. This is the representation used for exponential map representatoins of orientation.
Public Functions
-
RotationVector()#
Default constructor
-
RotationVector(const Vec3 &vec)#
Constructor from 3 vector.
- Parameters:
vec – the 3-vector of coefficients
-
RotationVector(const RotationVector &rv)#
Copy constructor.
- Parameters:
rv – Other RotationVector to copy from.
-
RotationVector &operator=(const RotationVector &other)#
Copy assignment operator.
- Parameters:
other – Other RotationVector to copy from.
- Returns:
Reference to this object.
-
RotationVector(RotationVector &&rv) noexcept#
Move constructor.
- Parameters:
rv – RotationVector to move from.
-
RotationVector &operator=(RotationVector &&other) noexcept#
Move assignment operator.
- Parameters:
other – RotationVector to move from.
- Returns:
Reference to this object.
-
bool operator==(const RotationVector &other) const#
Equality operator.
- Parameters:
other – RotationVector to compare with.
- Returns:
True if equal, false otherwise.
-
bool isApprox(const RotationVector &other, double prec = MATH_EPSILON)#
Approximate equality check.
- Parameters:
other – RotationVector to compare with.
prec – Precision threshold.
- Returns:
True if approximately equal, false otherwise.
-
inline std::string typeString() const#
Get the type string of this class.
- Returns:
“RotationVector”
-
double angle() const#
Return rotation angle.
- Returns:
The rotation angle.
-
const Vec3 &toVec3() const#
Return the RotationVector as a Vec3.
- Returns:
This RotationVector as a Vec3.
-
void uninitialize()#
Mark this RotationVector as uninitialized.
-
bool isInitialized() const#
Check whether this RotationVector is initialized.
- Returns:
True if initialized, false otherwise.
-
Vec3 rates2omega(const Vec3 &rates, bool oframe) const#
Compute the angular velocity from coeff rates.
- Parameters:
rates – The 3-vector with coefficient rates.
oframe – If true, the angular velocity is in the ‘from’ frame, else in the ‘to’ frame.
- Returns:
The angular velocity that cooresponds to the rates.
-
Vec3 omega2rates(const Vec3 &omega, bool oframe) const#
Compute the coeff rates from the angular velocity.
- Parameters:
omega – The 3-vector angular velocity.
oframe – If true, the angular velocity is in the ‘from’ frame, else in the ‘to’ frame.
- Returns:
The coefficient rates from the omega angular velocity
-
Mat33 rates2omegaMap(bool oframe) const#
The 3x3 matrix that maps the coefficient rates to the angular velocity.
- Parameters:
oframe – If true, the angular velocity is in the ‘from’ frame, else the ‘to’ frame.
- Returns:
The 3x3 matrix map
-
Mat33 omega2ratesMap(bool oframe) const#
The 3x3 matrix that maps the angular velocity to the coefficient rates.
- Parameters:
oframe – If true, the angular velocity is in the ‘from’ frame, else the ‘to’ frame
- Returns:
The 3x3 matrix map
-
Mat rates2quatratesMap() const#
The 4x3 matrix that maps the rotation vector rates to quaternion rates.
- Returns:
The 4x3 matrix map.
-
std::string dumpString(const std::string &prefix = "", unsigned int precision = 10, bool exponential = false) const#
Get a string representation of the RotationVector.
- Parameters:
prefix – String prefix for each line.
precision – Number of digits to use for floating point values.
exponential – Use exponential notation if true.
- Returns:
String with information about this RotationVector.
-
RotationVector()#