You need to be sensitive to communicating so you don't annoy them because either: - you are annoying them that you have to ask Or - you are too sensitive and worry but don't need to be. However, usually it's the body language or finding that a specific person is avoiding you.
You might try to interpret communication signals-the person might be generally disinterested in spending time or speaking with you or you may notice they treat others more warmly than they treat you.
and there may not be obvious indicators. Asking directly might be an opportunity to hash out the discord, or it might make the person feel defensive and annoyed further.
Nobody is perfect. Interpersonal tension is a fact of human social interaction-if you seem to be causing it for someone and talking it out is not an option, you should probably let it be. And if you are polite and respectful of their beef with you, there is no need for you to carry resentment or guilt. After all, for all you know they are projecting something onto you. (so what?)