I think it's unreasonable to ask everyone if they are okay with this. They could walk away before you get the chance, or you could simply forget.
Let me provide a bit more color on this one, the rule of thumb is if they(the cosplayer) are already posing, then go for it, take the shot. If they are not posing, if they are having a intimate conversation, taking a break, eating, getting in our out of parts of their costume. Ask first.
You don't want to be the paparazzi and make cosplayers feel like they don't have a moment peace or break. It may surprise you but wearing and caring our stuff is tiring, and we are on our feet most of the day and the last thing I need to feel like I need to hide so I can take my gear off and air dry a bit, eat a snack, or talk to my family. All this behavior does is drive people to not want to cosplay or to push hard for a zero photographer zones.
I know there are some photographers who like taking candid shots and even stalk cosplayers to catch them off guard. I have personally walked a few to security and had them bounced out of conventions for this. In one case causing a young lady to tears, shacking and to try to hide behind the biggest cosplay they could find(me, in a big daddy). Just don't, or if you do snap that shot, go over afterward and show them the shot and ask if its ok. It may be a great shot, but if the person does not want you to have it, then do the right thing and delete it.
Remember: You are not paying these people to model for you, so you can't expect them to do, or allow you to do, what ever you want without complaint.
Also remember you are not in public, you are on private property while on the grounds of the convention center/hotel and you are restricted by the policies of the convention. Nothing sets my wife (who is a professional photographer) off, is people trying to play hallway lawyer about this; conventions space is not public space, the square outside is still private property. General rule of thumb, if you are asked to stop, stop. If you don't, expect to be ejected and or arrested (as the upskirt fellow found out last year).