robotika / osgar

Open Source Garden (Autonomous) Robot
MIT License
13 stars 12 forks source link

Octomap-split and Octomap-diff/update #805

Open m3d opened 3 years ago

m3d commented 3 years ago

Binary octomap is relatively dense structure. Each node is encoded in 16bits, 2bits (free, occupied, unknown, node) for each of 8 directions. The dump is depth traversability ("prohledavani do hloubky"). The map size is currently limited by maximal allowed tree depth, which is 16.

If we want to share the map among robots we have to send it in ~1000 bytes packets. They can be lost so it would be useful if each packet contains useful information independently of context (part of the map). Each node can be uniquely addressed by level and x, y and z coordinates on this resolution level (level is actually number of valid bits in xyz coordinates). This is enough for one node, but if we have interval from original dump we need more (i.e. how is the next 16bit element related to currently processed one?). Now it looks that sufficient solution would be complete stack trace to the first node (limited by 16 = maximal tree depth) and then there can be data from the original map buffer.

The second requirement is incremental update. As the robots explore more volume of the world it would not be feasible to send always the whole map. The binary diff is not nice/small but the changes should be local (in 3D world/tree). Proposal is to send only index of root node of modified subtree and then its dump. For boundary cases it would be more suitable to allow to send list of roots thus limiting updated area.

Finally both split & update should be combined :) but that is left "for some future task".