The most difficult thing about this problem is mixed size boxes. Knowing where every box is is easy when they're all the same dimension and stacked neatly, but what about when they're packed randomly, many boxes are askew, and they're all different sizes? Then you need to get into complicated time-of-flight sensors, point clouds, surface/box recognition logic/AI, etc..