Singularity avoidance in robotic manipulators: a differential form approach