If you want the arm to also be a physics object, you might be better to create the arm completely from physics objects and use constraints for the joints. Be aware that the physics engine uses its own collision system, and they don't always interact together as you might expect. I think that would cause you less head-aches than trying to read the contact forces and calculating the the new joint angles yourself.