Laseer distance sensor on a stepper motor

Is it possible to attach such a sensor:

on a stepper motor so as to measure the distance of a wall or a furniture?


Just don't make too many turns or your wires will get messed up.

Add a slip ring connector and a “hollow shaft” stepper motor and you can spin for long, long time.