I can give just Target Point position to the Inverse kinematic chain and find a solution for the 4 DOF robot. Which moves 4 joints to touch the Target Point (Red Dot). However I also want certain condition for the rotation of the last Joint. I don't want to find a solution where the orientation of the last joint rotate along Z axis. In other words orientation of the end effector is important for me.
I am given a H.M to the inverse kinematic chain for the robot show above. My H.M is something like this (Target_x, Target_y, Target_z represents the red dot position):
[X X X Target_x] [X X X Target_y] [X X X Target_z] [0 0 0 1 ]
As you can see Rotation in H.M, not set (I wrote Xs) and solution is found only for the position. But I would like to set a orientation, so that end-effector would not rotate over its own Z axis. In other words rotation in Yaw should be zero. What kind of a rotation matrix should I set inside the H.M. to achieve this?
[X_? X_? X_?] Rotation = [X_? X_? X_?] [X_? X_? X_?]
P.S: I am using IKPY inverse kinematic python library which allows me to find inverse kinematic solution by Position, Orientation, or Position and Orientation together. I don't think it is directly related with the question it self, but I wanted to point out.