So i’m a little bit confused about how to get RPY from a rotation matrix. So far, I have made a rotation matrix but can get RPY because Rhino says the matrix is not a rotation matrix.
OK, I have some points on a material (surface) and want to reach those points with a Kuka robot. Robot needs coordinates and rotations to reach the target points. I have calculated 3 vectors of each points(normal, tangent and cross product of them) and made the rotation matrix. I don’t know if its the right way to calculate rotation matrix or not…any help will be appreciated!!
var rotationmatrix = new Transform(0); rotationmatrix.M00 = tangent.X; rotationmatrix.M01 = cross.X; rotationmatrix.M02 = normal.X; rotationmatrix.M03 = 0; rotationmatrix.M10 = tangent.Y; rotationmatrix.M11 = cross.Y; rotationmatrix.M12 = normal.Y; rotationmatrix.M13 = 0; rotationmatrix.M20 = vector.Z; rotationmatrix.M21 = cross.Z; rotationmatrix.M22 = tangent.Z; rotationmatrix.M23 = 0; rotationmatrix.Affineize(); rotationmatrix.GetYawPitchRoll(out double Y, out double P, out double R);