Integrated vision processing code with WaitForGoal command.