A New Algorithm for Gravity Compensation of a 3-UPU Parallel Manipulator