# Pose from point and two vectors

Hi,

I have point p, normal n and vector v, which is orthogonal to n. I want to compute the gripper Pose perpendicular with the normal and rotated based on v. In other words the resulting frame should have z axis perpendicular to n and x or y perpendicular to v. How can I compute the orientation quaternion?

Thanks

Originally posted by liborw on ROS Answers with karma: 801 on 2013-01-14

Post score: 0

If I understand you correctly you want an orientation/a new coordinate frame that is perpendicular to n, and "directed with v" (but v is not necessarily perpendicular to n).

The easiest might be to create a rotation matrix. n is one entry. A second one can be derived by n cross v. This should make sure that this entry is perpendicular to n and directed from v. The third one should be the cross of the other two.

My guess is that n cross v should go to column 1 and n to column 2, but not guarantees.

Originally posted by dornhege with karma: 31395 on 2013-01-14

This answer was ACCEPTED on the original site

Post score: 1