Reactive task adaptation based on hierarchical constraints classification for safe industrial robots