Measuring distance between two devices? (<30m, as accurate as possible)

If the object whose distance you wished to measure were like the face of a vice's jaw. you could project two dots of light onto it, from lines not perpendicular to the movement of the vice's jaw. And then use a simple image capture device, and image analysis to measure the separation of the dots, which would lead to distance.

Tell us more about what it is you want to measure the distance to. And how fast it will move and how often you need a new reading.

Always sparks better answers, or at least avoids useless one.