Motion control of a bio-inspired underwater robot with undulatory fin propulsion