A miniature capsule robot (capsubot) – which has no external moving parts whereas a conventional robot has legs and/or wheels – is suitable for in-vivo applications, engineering diagnosis and pipe inspection. This study addresses the trajectory-tracking problem of an underactuated planar capsubot. A combining piecewise and behaviour-based control algorithm is proposed for trajectory tracking. This study also proposes four motion behaviours, four switching behaviours and one stationary behaviour. A selection algorithm for behaviour-based control and rules for inner mass (IM) motion control in all the behaviours are developed. The partial feedback linearisation control is used for low-level IM motion control while the piecewise and behaviour-...