Control of the cleaning action for autonomous devices; Automatic detection of the surface condition before, during or after cleaning