Well the arm is just basically used to pick up things. But first got to get the arm to go to right place before I can get it to pick up things.
In terms of writing a arm solution library. I done work in my university with writing libraries for vector analysis using IR sensors.
In terms of the arm solution library there will only be one unknown as I see it that is the object which is not moving. The camera and the arm will always be set into know position for X,Y,Z planes. The camera will not be mounted on the arm though.
I then need to use sensor to measure where the object is relative to sensor (if I can use the camera it measure the distance that would be good but I don't think I can do that would good enough accuracy). Once I get that data since the arm and sensor are in a know position relatively to each other I can then figure out the vector between the object and the arm. Doing this will allow to get the arm to traverse the vector that i created in 3D space. I could do 2D space and then for the 3rd dimension which is depth in my case calculate another vector for this and this should allow me to move the arm to correct location.
The arm will have sensor on it which will give me angles relative to it's start position which is always know. Since I know the length of each section of the arm and the angles I can calculate where the arm should go.
The hard part I really see if getting the sensor to measure the object since I will need to aim the sensor directly at the object which is relative to camera that will be looking at the object. If I can get the sensor data good. The vector won't be hard to calculate that first year university mechanics.
I will work out the math tomorrow. Once I get my model correct I'll start to build