Rosanswers logo


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?


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

Post score: 0


1 Answer 1


Rosanswers logo

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

Original comments

Comment by liborw on 2013-01-14:
The v is actually orthogonal to n, I have edited the question.

Comment by dornhege on 2013-01-14:
This should make it easier. If I'm not mistaken, just take n, v, n cross v to build the rotation matrix.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.