How I could make the robot restart the whole process if an error appeared !?
Better to use state machine in such requirements
If you will get error in any one of state then you can change its state to the initial state.
Regards…!! Aksh