Hi - if the desired animation doesn't need to be too sophisticated, a simple gif animation, equipped with some door positions like shown in your picture, might be sufficient? I´ll link an example, done this way with only 10 frames, running back and forth...
https://sketchucation.com/forums/viewtopic.php?f=397&t=63826&p=659064&hilit=Bobby#p659064
(otherwise, Dave's animator suggestion above would be better)