Hardy inequalities related to Grushin type operators