Who realized planets orbit the sun?

In recent times it was Copernicus, who promptly got himself into all sorts of trouble for refuting the greek philosophers who were all the rage with the Roman Catholic church.