A three-layer planning architecture for the autonomous control of rehabilitation therapies based on social robots. (June 2017)