Welcome on HCM.
The erection of penis problem is not related to your urinary problem.
It is a different matter for which a detail discussion needed with me.
When your mind is fully prepared for sex and well stimulated with good surrounding with no tension and with you partner than there should be no problem in erection.
You can ask your wife to stimulate you during sex so that the stimuli needed for erection are there in sufficient amount.
Even than the problem is there than you can try Viagra
Thanks with good luck.