How to determine which angles of a parallelogram with extended side are required for a given point?

86 Views Asked by At

I am currently trying to determine what servo angles are necessary to align a robotic arm's claw to the given coordinates. Geometrically simplified, the robotic arm is a parallelogram with two servos at one vertex and one side extended further for the claw. Here is a diagram, pardon my drawing skills:

Simplified Diagram

The sides marked D are parallel and equivalent, as are the sides marked $C$. $E$ is of fixed length and is attached to $C$ (in reality it is just the extension of the $C$ piece). The servos adjust angles $\angle a$ and $\angle b$ to move sides $D$ and $C$ from the vertical. The claw itself is at the end of $E$, and $x$ refers to the horizontal distance and $y$ the vertical distance from the origin of the two angles $\angle a$ and $\angle b$ (AKA where the servos are placed).

As for what I have tried, I have calculated the claw's coordinates to be $X=D*sin(a)+E*sin(b)$ and $Y=D*cos(a)-E*cos(b)$, but I am unable to solve the system of equations such that I can determine what to set angles $\angle a$ and $\angle b$ to move the claw to a given point. When using substitution, I only end up with an extremely convoluted equation that my calculator cannot parse, leading me to believe I am going down the wrong path. Any help would be much appreciated!