# Inverse Kinematics Constant End Effector Angle

I have a simple RRR manipulator where one motor controls the base rotation, and the other two allow movement in a plane extending forward from the base and upwards/downwards. Are there any standard ways to ensure the angle of the end effector remains constant?

My current solution uses explicit trigonometric expressions based on distance between joints, but if there is a better way to solve it to include restraints I'd be open to suggestions.

### Edit

The manipulator is essentially like the image below, but with an additional base rotation. This allowed for the inverse kinematics to be simplified. As a reference here is the site http://www.hessmer.org/uploads/RobotArm/Inverse%2520Kinematics%2520for%2520Robot%2520Arm.pdf • Is this a planar manipulator? If not, can you describe the kinematics better? Perhaps with a diagram. Clearly, you have 3 revolute joints, but calling it RRR implies all the joint axes are the same. – Ben Nov 4 '14 at 15:06
• So what you really have is like figure 4 in that document? Where joint 1 rotates about the Z (up) axis, then the arm's 2 main links lie in the XZ plane. Basically a 2 link planar arm in the vertical plane, mounted on a turret. I'd probably call this a YPP (Yaw-Pitch-Pitch) configuration. – Ben Nov 7 '14 at 11:52

You want the angle of link 2 to stay constant relative to the global frame? I think that your arm is so simple what you are doing is probably best. I wonder if you need trig though. To keep link 2 at a constant world angle, i think you can use this equation: $$\Delta \theta_1 = - \Delta \theta_2$$ So every time you move one joint by some amount, you should move the other joint the same amount but in the opposite direction.
For a RRR planar manipulator, typical state variables would be $x$,$y$ and $\theta$, the two first ones being the position of the end effector in the 2D plane, and $\theta$ the orientation of the end effector. (please note, altough in the picture the articular positions are nammed $\theta_1$, $\theta_2$ and $\theta_3$, we will here use $q_1$, $q_2$, and $q_3$ for clarity)
The expression of $\theta$ with regards to the articular positions $q_1, q_2, q_3$ is $$\theta = q_1 + q_2 + q_3$$
To ensure kinematically that $\theta(t)=\theta_d=Cste$, $\dot{\theta}(t)=0$ and $\ddot{\theta}(t)=0$, you simply need to impose it as constant for the resolution of the inverse kinematics and its derivatives.