Oh, never mind about the computational wondering there. Re-read the source code and realized how the collision check works.

Still there's this feature that Stage doesn't realize collisions inside blocks and intrepretes block interiors free in occupancy grid mapping (because of boundaries rendered only).

I can work around this by "rasterizing" the bitmap so that solid walls will be filled with smaller blocks, but that seems quite stupid (lots of unnecessary blocks). Is there another easy way to, for example, randomize robot's position so that it won't end up inside bigger blocks or realize it is inside another block?