ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Tue, 26 Mar 2013 14:10:05 -0500How to represent my end-effector in Quaternionshttps://answers.ros.org/question/59299/how-to-represent-my-end-effector-in-quaternions/Hello all,
I am having some confusion with the representation of the end-effector of my robot. I have a point in space where I want the end-effector to go but I am unsure how to produce the quaternions.
I have the "base_link" as the fixed frame (0,0,0 @ the center of the horizontal grey cylinder, axes: z-up, x-right, y-back), and the point in space (0.15,-0.60,-0.20) w.r.t that fixed frame. [Here is a picture of my situation](http://i.imgur.com/GoimzSy.png).
My end-effector as defined by the urdf file is pointing straight down with the initial orientation of (w=1,x=0,y=0,z=0).
My goal is to reach for the green cylinder in the picture. I believe I need a rotation of ~ -90 degrees about the x-axis (pitch), ~0 degrees about the y-axis (roll) and a range of values ~(-15,+15) about the z-axis corresponding to different (yaw) angles to pick up the green cyclinder with, depending on it's location on the table.
If this is correct, are my quaternions defined by the conversion below, where phi,theta, and psy represent x,y,z rotations I described above?
![image description](/upfiles/13643426733106631.png) (from [wiki](http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles))
I've been looking at other posts but I just can't quite wrap my head around this concept and I really appreciate any help!
**EDIT** I worked it out over matlab and this is the correct way to determine what orientation you want your end-effector link via RPY coordinates w.r.t. some fixed frame. Cheers!
Kind Regards,
MartinTue, 26 Mar 2013 14:10:05 -0500https://answers.ros.org/question/59299/how-to-represent-my-end-effector-in-quaternions/