What I usually do is check if you can reach a position behind the door.
getmap().canreach(), if so, walk inside, if not get the door object and interact with it
That's osbot rnadomly doing it when there is something it can't click, if it doesn't rotate it it would get stuck.
I can add something to keep a high pitch though ^^