We present a perturbative method for ab initio calculations of rotational and rovibrational effective Hamiltonians of both rigid and non-rigid molecules. Our approach is based on a curvilinear implementation of second order vibrational Møller-Plesset perturbation theory extended to include rotational effects via a second order contact transformation. Though more expensive, this approach is significantly more accurate than standard second order vibrational perturbation theory for systems that are poorly described to zeroth order by rectilinear normal mode harmonic oscillators. We apply this method to and demonstrate its accuracy on two molecules: Si2C, a quasilinear triatomic with significant bending anharmonicity, and CH3NO2, which contains a completely unhindered methyl rotor. In addition to these two examples, we discuss several key technical aspects of the method, including an efficient implementation of Eckart and quasi-Eckart frame embedding that does not rely on numerical finite differences.