: To realise fish-like swim patterns by a robotic system poses tremendous challenges. This requires fully understanding of fish biomechanics and the way to mimic it. This paper presents our research toward the sensorbased control of autonomous robotic fish that can swim in a 3D unstructured environment, based on observations of fish swim behaviours. Our robotic fish has a tail with three or four degrees of freedom (DOF) and is controlled by 4 onboard computers (a powerful Gumstix Linux PC and 3 PICs) and over 10 embedded sensors. Both simulated and the real fish experiments are conducted to show the feasibility and performance of the proposed approach.