标签:style color ros 角度 16px family 欧拉角 alpha div
三维坐标系中,已知三个欧拉角alpha,beta,gamma,分别为绕x轴旋转alpha角度,绕y轴旋转beta角度,绕z轴旋转gamma角度。则旋转矩阵Rotation的求法如下:
Mat Rot=Mat::eye(3,3, CV_32FC1); Rot.at<float>(0, 0) = cos(beta) * cos(gamma); Rot.at<float>(0, 1) = cos(beta) * sin(gamma); Rot.at<float>(0, 2) = -sin(beta); Rot.at<float>(1, 0) = sin(alpha) * sin(beta) * cos(gamma) - cos(alpha) * sin(gamma); Rot.at<float>(1, 1) = sin(alpha) * sin(beta) * sin(gamma) + cos(alpha) * cos(gamma); Rot.at<float>(1, 2) = sin(alpha) * cos(beta); Rot.at<float>(2, 0) = cos(alpha) * sin(beta) * cos(gamma) + sin(alpha) * sin(gamma); Rot.at<float>(2, 1) = cos(alpha) * sin(beta) * sin(gamma) - sin(alpha) * cos(gamma); Rot.at<float>(2, 2) = cos(alpha) * cos(beta);
Rotation是3*3矩阵,用于三维空间坐标的旋转。
标签:style color ros 角度 16px family 欧拉角 alpha div
原文地址:http://www.cnblogs.com/riddick/p/7398119.html