How to detect thickness of an obastacle by IR?

Nice approach!