Data Sheet

74
6.2 ARMSDK_Math.h
(1) static matd GetOrientationMatrix(double Roll, double Pitch, double Yaw)
Parameter
double Roll, double Pitch, double Yaw
Returns
3 x 3 Rotation Matrix
Description
orientation(Roll, Pitch, Yaw) input
3 x 3 orientation matrix output
(2) static matd GetTransformMatrix(double Roll, double Pitch, double Yaw,
double x, double y, double z)
Parameter
double Roll, double Pitch, double Yaw
double x, double y, double z
Returns
4 x 4 Transformation Matrix
Description
orientation(Roll, Pitch, Yaw) Position(X, Y, Z) input
4 x 4 transform Matrix output
(3) static vecd rot2omega(mat3d Rerr)
Parameter
Rotation Matrix
Returns
angular velocity array
Description
rotation matrix gets input and outputs velocity array
(4) static vecd ConvertRad2Deg(vecd q)
Parameter
radian Array
Returns
Degree Array
Description
(rad) gets input, change to (value) and return
(5) static vecd GetEulerRollPitchYaw(matd T)
Parameter
3 x 3 rotation Matrix or 4 x 4 Transformation Matrix
Returns
3 x 1 array (Roll, Pitch, Yaw
Description
vecd rpy(3);
rpy(0) = atan2( T(2,1), T(2,2));
rpy(1) = atan2(-T(2,0), sqrt(T(2,1)*T(2,1) + T(2,2)*T(2,2)) );
rpy(2) = atan2( T(1,0), T(0,0));