Tracking in compliant robot motion: automatic generation of the task frame trajectory based on observation of the natural constraints