Ask Your Question
0

Define end-effector pose by point and vector

asked 2017-01-31 05:27:26 -0600

HannesIII gravatar image

Hi all,

I am using a UR10 with Moveit! for motion planning (move group interface C++). I want to align my end-effector with a vector in space. I read a lot about quaternions and rotation in 3d space, but at the moment I struggle to find out the best way to do this.

I have a given point (x,y,z) and a given vector for orientation (a,b,c), how can I set a target pose for the end-effector? Tried to use a geometry_msg but it needs a point and a quaternion. Also tried to calculate a quaternion between the current vector and the goal vector using cross product etc. but therefore I would need the vector of the current pose and I struggled to find it out -.- Does anybody know a clean solution for my problem?

Thank you very much in advance!

Hannes

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-01-31 15:29:36 -0600

If you know the direction of the tool's approach vector then yes you can use the cross product to "produce" the other two orthogonal vectors needed to define an orthonormal 3x3 orientation matrix. The 3x3 orientation matrix R can be represented as R = [tx ty tz] where each entry is a 3x1 unit vector and all vectors are perpendicular to each other. Assuming that the known tool vector [a,b ,c] is the tz vector then you can obtain tx as the cross product of tz and [0 1 0]' . Then ty is just the cross product between tz and tx. You can then form the matrix R. The Eigen library has very powerful tools for doing these sort of calculations and its well integrated into MoveIt!

edit flag offensive delete link more

Comments

Hi, thank you for your answer! It is the correcht approach. The next step is just to create a quaternion out of the matrix from your post and set it as orientation for the goal pose. Unfortunately I thought a bit to complicated. I will mark your answer as correct!

HannesIII gravatar imageHannesIII ( 2017-01-31 16:41:21 -0600 )edit

Hi jrgnicho, would you mind sharing the source of your answer? I'm working on a very similar problem and would like more details about your solution. Is it from a book or something else? Thanks!

chriszzh gravatar imagechriszzh ( 2018-05-04 20:00:44 -0600 )edit

Thanks. Best answer!

vamshi666 gravatar imagevamshi666 ( 2019-12-10 14:58:12 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-01-31 05:27:26 -0600

Seen: 788 times

Last updated: Jan 31 '17