Any robotics project has the following basic components:
- Brains (RPi)
If you could list these out it would be easier to answer, but to put it crudely:
Get some sort of position data of your arm from a sensor. This
data could be an angle of the arm, in the simplest case, or it could be
a higher dimensional state vector consisting of mutliple angles,
angular velocities etc. in the case of multi link manipulators.
Formulate your control:
Any sort of robotic system needs a control law to drive the system's
state to where you want it to be i.e. move the arm where you want it to
go. For this you can use a variety of control methods ranging from
linear (PID), optimal (LQR), robust (SMC, H_inf), nonlinear (Feedback
Linearisation), intelligent (fuzzy, neural) and adaptive control.
However keep in mind that theory and practice are vastly different.
Implement your control:
After formulating your control law, and making sure it actually does
what its supposed to (by simulation), you need to translate the
mathematical equations and laws to code, in any language of your
choice, so that the brains can run it.
This is pretty much all you need to do (please correct me if I'm missign something), and I wont get into the implementation aspects of it too much but here's some things to keep in mind:
Multi link robots are highly nonlinear systems, and the "right way" to control them is either to linearise the system, or to use nonlinear control (http://journals.sagepub.com/doi/10.1177/027836498500400205). However I believe that in practical use, PID works fine almost always and although this is not the right way to do it, if you just want something that works..
Sensors are noisy, and you will never get any good clean data, so knowledge about filters is a really useful thing to have, but again you can get away with using libraries made by other people.
Theoretical tuning methods never work, as your dynamic model is almost always far off from the real thing. So use heurestic methods, and there are a lot of these for PID.