It’s not necessarily a perpetual motion machine. If the anti-gravity mechanism requires a larger energy input than you could get out of the wheel, you’d at least be keeping up with the laws of conservation of energy. It would only be perpetual motion if your anti-grav device required less energy than the wheel generated.