'It is only a sin if done wrong."

Has the Church defined what is the right way and what is the wrong way?  Perhaps the Church needs a Pontifical Commission to spend a few decades studying this very important question of Canon Law.