# Ignoring yaw for pick and place

I get an object pose from the camera in quaternion. Since these are tetrahedron shaped objects, the robot needs to align the vacuum gripper to one of the sides of the object. But the yaw (rotation along surface normal) can be ignored.

I tried this by converting it to Euler angles, set yaw = 0, and converted back to quaternion. This works in some cases, but for certain cases, the robot picks up at an angle which seems to be 90° rotated.

Do I need to take care for certain cases of Euler angles or is there a better way to do this?

• are you picking from a flat surface ? Euler angles are subject to gimbal lock in general it is better toa void them and use rotation matrix or quaternions. – N. Staub Nov 7 '17 at 14:59
• Yes I am picking from the flat surface. How do I use quaternions to ignore rotation about surface normal? – harsh Nov 7 '17 at 15:09
• Quaternion are describing a 3D vector and a rotation around this vector, to go from the origin frame to the destination frame. So either you go in direction of quaternion math or you pass through rotation matrix and back to quaternion. Note that what you define as zero yaw is a bit ambiguous, maybe you should let the yaw ad a degree of freedom in your approach (letting your planer chose the best one for grasping) or chose something to align a frame of the main axis with the tetrahedron apex. – N. Staub Nov 7 '17 at 15:20
• "zero yaw is a bit ambiguous": So basically the camera module attaches a frame to an arbitrary side of the object. Zero yaw is basically that I want to pick the object normal to the surface not rotating the 6th joint of the arm. In other words, ignore the rotation along the surface normal – harsh Nov 7 '17 at 15:25
• I got what you intend to do, but I think that referring to it as "zero yaw" is ambiguous. What you want is that the arbitrary frame attached by your vision algorithm rotates in order to no ask for a motion of end-effector around the yaw. This is fair but is not in practice tedious because you need to know with which configuration your EE will arrive to the surface. The best in my opinion is to control only the 3D position and the 2D orientation, you then have a redundant robots (6DOFs for 5) so you can either force the orientation or use redundancy to optimize a criterion. – N. Staub Nov 7 '17 at 15:34