Work on Autonomous

fixed code for field detection