Blender
V3.3
|
represents rotations in 3 dimensional space. More...
#include <frames.hpp>
Public Member Functions | |
Rotation () | |
Rotation (double Xx, double Yx, double Zx, double Xy, double Yy, double Zy, double Xz, double Yz, double Zz) | |
Rotation (const Vector &x, const Vector &y, const Vector &z) | |
void | setValue (float *oglmat) |
void | getValue (float *oglmat) const |
Rotation & | operator= (const Rotation &arg) |
Vector | operator* (const Vector &v) const |
double & | operator() (int i, int j) |
Access to elements 0..2,0..2, bounds are checked when NDEBUG is not set. More... | |
double | operator() (int i, int j) const |
Access to elements 0..2,0..2, bounds are checked when NDEBUG is not set. More... | |
void | SetInverse () |
Sets the value of *this to its inverse. More... | |
Rotation | Inverse () const |
Gives back the inverse rotation matrix of *this. More... | |
Vector | Inverse (const Vector &v) const |
The same as R.Inverse()*v but more efficient. More... | |
Wrench | Inverse (const Wrench &arg) const |
The same as R.Inverse()*arg but more efficient. More... | |
Twist | Inverse (const Twist &arg) const |
The same as R.Inverse()*arg but more efficient. More... | |
void | DoRotX (double angle) |
void | DoRotY (double angle) |
void | DoRotZ (double angle) |
void | Ortho () |
Vector | GetRot () const |
Vector2 | GetXZRot () const |
double | GetRotAngle (Vector &axis, double eps=epsilon) const |
void | GetEulerZYZ (double &alfa, double &beta, double &gamma) const |
void | GetRPY (double &roll, double &pitch, double &yaw) const |
void | GetEulerZYX (double &Alfa, double &Beta, double &Gamma) const |
Twist | operator* (const Twist &arg) const |
Wrench | operator* (const Wrench &arg) const |
Vector | UnitX () const |
Access to the underlying unitvectors of the rotation matrix. More... | |
void | UnitX (const Vector &X) |
Access to the underlying unitvectors of the rotation matrix. More... | |
Vector | UnitY () const |
Access to the underlying unitvectors of the rotation matrix. More... | |
void | UnitY (const Vector &X) |
Access to the underlying unitvectors of the rotation matrix. More... | |
Vector | UnitZ () const |
Access to the underlying unitvectors of the rotation matrix. More... | |
void | UnitZ (const Vector &X) |
Access to the underlying unitvectors of the rotation matrix. More... | |
Static Public Member Functions | |
static Rotation | Identity () |
Gives back an identity rotaton matrix. More... | |
static Rotation | RotX (double angle) |
The Rot... static functions give the value of the appropriate rotation matrix back. More... | |
static Rotation | RotY (double angle) |
The Rot... static functions give the value of the appropriate rotation matrix back. More... | |
static Rotation | RotZ (double angle) |
The Rot... static functions give the value of the appropriate rotation matrix back. More... | |
static Rotation | Rot (const Vector &rotaxis, double angle) |
static Rotation | Rot2 (const Vector &rotvec, double angle) |
Along an arbitrary axes. rotvec should be normalized. More... | |
static Rotation | EulerZYZ (double Alfa, double Beta, double Gamma) |
static Rotation | RPY (double roll, double pitch, double yaw) |
static Rotation | EulerZYX (double Alfa, double Beta, double Gamma) |
Public Attributes | |
double | data [9] |
Friends | |
class | Frame |
Rotation | operator* (const Rotation &lhs, const Rotation &rhs) |
bool | operator== (const Rotation &a, const Rotation &b) |
The literal equality operator==(), also identical. More... | |
bool | operator!= (const Rotation &a, const Rotation &b) |
The literal inequality operator!=() More... | |
represents rotations in 3 dimensional space.
This class represents a rotation matrix with the following conventions :
Suppose V2 = R*V, (1) V is expressed in frame B V2 is expressed in frame A This matrix R consists of 3 collumns [ X,Y,Z ], X,Y, and Z contain the axes of frame B, expressed in frame A Because of linearity expr(1) is valid.
This class only represents rotational_interpolation, not translation Two interpretations are possible for rotation angles. if you rotate with angle around X frame A to have frame B, then the result of SetRotX is equal to frame B expressed wrt A. In code:
Rotation R; F_A_B = R.SetRotX(angle);
Secondly, if you take the following code :
Vector p,p2; Rotation R; R.SetRotX(angle); p2 = R*p;
then the frame p2 is rotated around X axis with (-angle). Analogue reasonings can be applyd to SetRotY,SetRotZ,SetRot
Definition at line 298 of file frames.hpp.
|
inline |
Definition at line 303 of file frames.hpp.
References Identity().
Referenced by EulerZYZ(), Identity(), Rot(), Rot2(), RotX(), RotY(), RotZ(), and RPY().
|
inline |
Definition at line 507 of file frames.inl.
References data.
The DoRot... functions apply a rotation R to *this,such that *this = *this * Rot.. DoRot... functions are only defined when they can be executed more efficiently
Definition at line 560 of file frames.inl.
References angle(), KDL::cos(), KDL::sin(), and x2.
The DoRot... functions apply a rotation R to *this,such that *this = *this * Rot.. DoRot... functions are only defined when they can be executed more efficiently
Definition at line 576 of file frames.inl.
References angle(), KDL::cos(), KDL::sin(), and x2.
The DoRot... functions apply a rotation R to *this,such that *this = *this * Rot.. DoRot... functions are only defined when they can be executed more efficiently
Definition at line 592 of file frames.inl.
References angle(), KDL::cos(), KDL::sin(), and x2.
Gives back a rotation matrix specified with EulerZYX convention : First rotate around Z with alfa, then around the new Y with beta, then around new X with gamma.
closely related to RPY-convention
Definition at line 435 of file frames.hpp.
References RPY().
Referenced by KDL::operator>>(), posrandom(), and random().
Gives back a rotation matrix specified with EulerZYZ convention : First rotate around Z with alfa, then around the new Y with beta, then around new Z with gamma.
Definition at line 220 of file frames.cpp.
References KDL::cos(), Rotation(), and KDL::sin().
Referenced by KDL::operator>>().
GetEulerZYX gets the euler ZYX parameters of a rotation : First rotate around Z with alfa, then around the new Y with beta, then around new X with gamma.
Range of the results of GetEulerZYX : -PI <= alfa <= PI -PI <= gamma <= PI -PI/2 <= beta <= PI/2
Closely related to RPY-convention.
Definition at line 450 of file frames.hpp.
References GetRPY().
Gives back the EulerZYZ convention description of the rotation matrix : First rotate around Z with alfa, then around the new Y with beta, then around new Z with gamma.
Variables are bound by (-PI <= alfa <= PI), (0 <= beta <= PI), (-PI <= alfa <= PI)
Definition at line 233 of file frames.cpp.
References KDL::atan2(), beta(), data, KDL::epsilon, fabs(), KDL::PI, KDL::sqr(), and KDL::sqrt().
Vector KDL::Rotation::GetRot | ( | ) | const |
Returns a vector with the direction of the equiv. axis and its norm is angle
Definition at line 297 of file frames.cpp.
References KDL::atan2(), KDL::Vector::data, data, KDL::epsilon, KDL::Vector::Norm(), and KDL::PI.
Referenced by convert_tree(), and GetJointRotation().
Returns the rotation angle around the equiv. axis
axis | the rotation axis is returned in this variable |
eps | : in the case of angle == 0 : rot axis is undefined and choosen to be +/- Z-axis in the case of angle == PI : 2 solutions, positive Z-component of the axis is choosen. |
Returns the rotation angle around the equiv. axis
axis | the rotation axis is returned in this variable |
eps | : in the case of angle == 0 : rot axis is undefined and choosen to be +/- Z-axis in the case of angle == PI : 2 solutions, positive Z-component of the axis is choosen. |
Definition at line 354 of file frames.cpp.
References KDL::acos(), angle(), data, eps, KDL::PI, KDL::sin(), KDL::sqrt(), x, y, and z.
Gives back a vector in RPY coordinates, variables are bound by -PI <= roll <= PI -PI <= Yaw <= PI -PI/2 <= PITCH <= PI/2
convention : first rotate around X with roll, then around the old Y with pitch, then around old Z with alfa
Definition at line 207 of file frames.cpp.
References KDL::atan2(), data, KDL::epsilon, fabs(), KDL::PI, KDL::sign(), KDL::sqr(), and KDL::sqrt().
Referenced by GetEulerZYX().
Definition at line 664 of file frames.inl.
Referenced by KDL::Frame::getValue().
Vector2 KDL::Rotation::GetXZRot | ( | ) | const |
Returns a 2D vector representing the equivalent rotation in the XZ plane that brings the Y axis onto the Matrix Y axis and its norm is angle
Definition at line 330 of file frames.cpp.
References KDL::acos(), data, KDL::epsilon, norm(), KDL::Vector2::Normalize(), and KDL::PI.
Referenced by GetJointRotation().
|
inlinestatic |
Gives back an identity rotaton matrix.
Definition at line 556 of file frames.inl.
References Rotation().
Referenced by KDL::Frame::Identity(), KDL::operator>>(), and Rotation().
|
inline |
Gives back the inverse rotation matrix of *this.
Definition at line 641 of file frames.inl.
References SetInverse().
Referenced by base_callback(), iTaSC::Armature::updateJoint(), and iTaSC::MovingFrame::updateKinematics().
The same as R.Inverse()*arg but more efficient.
Definition at line 200 of file frames.inl.
References KDL::Twist::rot, and KDL::Twist::vel.
The same as R.Inverse()*v but more efficient.
Definition at line 648 of file frames.inl.
The same as R.Inverse()*arg but more efficient.
Definition at line 195 of file frames.inl.
References KDL::Wrench::force, and KDL::Wrench::torque.
|
inline |
Access to elements 0..2,0..2, bounds are checked when NDEBUG is not set.
Definition at line 497 of file frames.inl.
References data, and FRAMES_CHECKI.
|
inline |
Access to elements 0..2,0..2, bounds are checked when NDEBUG is not set.
Definition at line 502 of file frames.inl.
References data, and FRAMES_CHECKI.
Transformation of the base to which the twist is expressed. Complexity : 18M+12A
Definition at line 539 of file frames.inl.
Transformation of the base to which the wrench is expressed. Complexity : 18M+12A
Definition at line 548 of file frames.inl.
Definition at line 524 of file frames.inl.
void KDL::Rotation::Ortho | ( | ) |
Definition at line 169 of file frames.cpp.
References data, e, KDL::sqr(), and KDL::sqrt().
Referenced by setValue().
Along an arbitrary axes. It is not necessary to normalize rotaxis. returns identity rotation matrix in the case that the norm of rotaxis is too small to be used.
Definition at line 250 of file frames.cpp.
References angle(), KDL::cos(), KDL::Vector::Normalize(), Rotation(), KDL::sin(), and usdtokens::st().
Referenced by KDL::Frame::Integrate(), and KDL::operator>>().
Along an arbitrary axes. rotvec should be normalized.
Definition at line 273 of file frames.cpp.
References angle(), KDL::cos(), Rotation(), KDL::sin(), and usdtokens::st().
The Rot... static functions give the value of the appropriate rotation matrix back.
Definition at line 609 of file frames.inl.
References angle(), KDL::cos(), Rotation(), and KDL::sin().
Referenced by KDL::Joint::pose(), and RemoveEulerAngleFromMatrix().
The Rot... static functions give the value of the appropriate rotation matrix back.
Definition at line 614 of file frames.inl.
References angle(), KDL::cos(), Rotation(), and KDL::sin().
Referenced by KDL::Joint::pose(), and RemoveEulerAngleFromMatrix().
The Rot... static functions give the value of the appropriate rotation matrix back.
Definition at line 619 of file frames.inl.
References angle(), KDL::cos(), Rotation(), and KDL::sin().
Referenced by KDL::Joint::pose(), and RemoveEulerAngleFromMatrix().
Sets the value of this object to a rotation specified with RPY convention: first rotate around X with roll, then around the old Y with pitch, then around old Z with alfa
Definition at line 195 of file frames.cpp.
References KDL::cos(), Rotation(), and KDL::sin().
Referenced by EulerZYX(), and KDL::operator>>().
|
inline |
Sets the value of *this to its inverse.
Definition at line 672 of file frames.inl.
References data.
Referenced by Inverse().
Definition at line 656 of file frames.inl.
Referenced by convert_pose(), and KDL::Frame::setValue().
|
inline |
Access to the underlying unitvectors of the rotation matrix.
Definition at line 467 of file frames.hpp.
References data.
Referenced by base_callback().
Access to the underlying unitvectors of the rotation matrix.
Definition at line 472 of file frames.hpp.
|
inline |
Access to the underlying unitvectors of the rotation matrix.
Definition at line 479 of file frames.hpp.
References data.
Referenced by base_callback().
Access to the underlying unitvectors of the rotation matrix.
Definition at line 484 of file frames.hpp.
|
inline |
Access to the underlying unitvectors of the rotation matrix.
Definition at line 491 of file frames.hpp.
References data.
Referenced by base_callback().
Access to the underlying unitvectors of the rotation matrix.
Definition at line 496 of file frames.hpp.
|
friend |
Definition at line 511 of file frames.hpp.
The literal inequality operator!=()
Definition at line 177 of file frames.cpp.
The literal equality operator==(), also identical.
do not use operator == because the definition of Equal(.,.) is slightly different. It compares whether the 2 arguments are equal in an eps-interval
Definition at line 377 of file frames.cpp.
double KDL::Rotation::data[9] |
Definition at line 301 of file frames.hpp.
Referenced by GetEulerZYZ(), GetRot(), GetRotAngle(), GetRPY(), getValue(), GetXZRot(), Inverse(), operator()(), operator*(), operator=(), Ortho(), Rotation(), SetInverse(), setValue(), UnitX(), UnitY(), and UnitZ().