The short answer is Yes. But here is what we think:
Skating on the carpet is a great way to build coordination and balance. Roller skating shoes have wheels designed to move on a hard surface, but most carpets have deep piles and can be slippery. Practice on the rug before trying it out on the floor to see if you will be able to skate effectively with your current skillset.