Learning anticipation via spiking networks: Application to navigation control