What's the difference between getEulerYPR, getEulerZYX and getRPY?
Hello everyone,
I noticed tf::Matrix3x3
provides 3 distinct methods (getEulerYPR
, getEulerZYX
and getRPY
) and they all seem to give the very same results :
The output of the following snippet is given below :
double roll, pitch, yaw;
tf::Matrix3x3(transform.getRotation()).getRPY(roll, pitch, yaw);
std::cout<<"getRPY(): "<<roll<<" "<<pitch<<" "<<yaw<<"\n";
tf::Matrix3x3(transform.getRotation()).getEulerYPR(yaw, pitch, roll);
std::cout<<"getEulerYPR(): "<<roll<<" "<<pitch<<" "<<yaw<<"\n";
tf::Matrix3x3(transform.getRotation()).getEulerZYX(yaw, pitch, roll);
std::cout<<"getEulerZYX(): "<<roll<<" "<<pitch<<" "<<yaw<<"\n";
outputs:
getRPY(): 0.000254904 -0.00770209 -0.0312527
getEulerYPR(): 0.000254904 -0.00770209 -0.0312527
getEulerZYX(): 0.000254904 -0.00770209 -0.0312527
Why do we have duplicate methods that seem to do exactly one thing? Can somebody please shed some light on this? Thanks a lot in advance