Measure a distance while jogging a robot

Following this question (posted in an other community) I have created the attached video to explain how to do a measurement while jogging a robot or while running a simulation.