An impulse-momentum approach to control of a class of underactuated mechanical systems