Motion control of rigid robot manipulators via first and second order sliding modes