Set gripping orientation depending on component orientation

Hello everyone,

I am sitting on a problem for quite some time now. Let A be a component, which has an initial position a_pick in the world coordinate system. To pick A, a gripping point and orientation gripper_pick are known in the world coordinate system as well.
Now I have a place position a_place. How do I get the orientation of the gripper for a_place?

I have tried different things already:

  1. Get WPR of a_pick and a_place, calculate the difference, and add the difference to the WPR angles of gripper_pick to get gripper_place, which seemed to be reasonable, as all positions are defined in the world coordinate system. However, it didn’t work as I hoped. (See attached picture).

  2. I also tried to rotate the position matrix of gripper_pick around the difference between a_pick and a_place. This however did not work either.

I use .Net API for my project to read in relevant data about positions and process sequences from a JSON File. I would be happy if someone could help me with this problem or could tell me, which function I have to use to transform the gripper orientation correctly.

Kind regards,


WPR angles are generally not something you can perform sum and difference operations and get meaningful results. In order to “chain” transformations you need to use matrix multiplication and inverse operations.

Let’s look at the picture below. On the first image you have 3 transformations (matrices). “part” matrix is know position of a part. “pick” matrix is taught pick position for gripper. “part” and “pick” are using the same reference coordinate system (e.g. robot world). “pick_in_part” is the pick position in reference to part position. And it can be calculated like this in python API:

ipart =
pick_in_part = ipart * pick

On the second image you have new known position for part called “part_x”. And you want to know new known pick position “pick_x”. This can now be calculated with the help of known transformation “pick_in_part”:

pick_x = part_x * pick_in_part


1 Like