Not being a fan of HOAs; this easy for me:
Communities with HOAs are not good prospects for Rental property.
They often have restrictions on the number of Rentals, if any, allowed.
You cannot have sufficient control over your Renters with regard to following the HOAs rules and regulations; such as parking, maintenance and parties.
You cannot rely on the HOA to maintain set fees; they have a habit of raising fees, just when you think you have gotten into the "black" on expenses.
The Condo/Townhouse will be more difficult to sell, should you decide to, do to a tenant and the HOA.
Think in terms of a SFR. Listen to your Realtor.