The video shows a safety feature which stops the motion if it bumps into something. Looks like it's just simple detection of excessive resistance to the drive motor. Maybe be careful if you have any small pets?
But can you easily differentiate between something which is pushed by the wall and something heavy that is on the shelf ?
Also granted you can, my instinctive reaction, the instinctive reaction is IMO try to get out, not push against the wall.
Seems to me it's not such a simple problem to solve unless you are ok with (i) some level of discomfort (ii) getting pets stuck inside and traumatised for life (granted the device does stop it's movement before crushing it).