Changed min to max, when I update the ros and also skip a few steps if
time_now-tign>count*interval