How to get the orientation/center line of a corridor

How to get the orientation/center line of a corridor (or directly regarded as a room)?

The problem I am currently trying to solve: Check if a corridor has a clear space of 150 cm diameter every 10 meters.

So, I want to place cylindrical inspection volumes every 10 meters along the center line.