Developmental stages of perception and language acquisition in a perceptually grounded robot