In a gated community there is likely a home owners association which would govern any major changes to the visible exterior of a home. I would start there and find out if this could even be approved before you invest any serious time or money into it.
Next, if they would permit the panels, I wouldn't count on resale but the payback you might receive during your stay in the home. For example, if the energy produced would return your investment in 3-5 years, it might make sense. If it's a 10 year period or more, with your stated history it might not make sense.
Part of gated communitiesâ€™ attraction to many buyers is uniformity. If you are one of the few homes with these panels on the roof, it could actually hurt resale if the system is not more broadly accepted in the market by then. Tread carefully and don't believe all the hype from the salespeople.