-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarification: why force binaryMsg to only accept OcTrees? #4
Comments
The binary format (.bt files in OctoMap) can only store binary information for a leaf: free or occupied. Therefor, you cannot store color or other information, which is why only the OcTree class makes sense. The other format (comparable to .ot files) is more like general container and can contain any information. It may be possible to have different occupancy octrees in the binary format and somehow store or "invent" the missing information. But for the format to be used in a general "factory pattern" way there's still functionality missing from the OctoMap API itself, as described in OctoMap/octomap#1 |
Thank you very much for the clarification and update :) |
One more follow up question regarding this - when taking any OcTree and creating a binary message, the id/type is still specified as what the original OcTree was - e.g. it will say "ColorOcTree" even if the binary message only contains non-color information, cf. https://github.com/OctoMap/octomap_msgs/blob/master/include/octomap_msgs/conversions.h#L151. Should the id here perhaps be hard-coded to be "OcTree"? |
I'm not really sure what the best or correct behavior would be here... In theory there could be other occupancy octree classes that validly encode back and forth to a binary msg so I thought it might be a good idea to preserve the original class just in case. I think the final implementation depends on how it'll be implemented in OctoMap/octomap#1. |
Hello, |
Alright, that check is now gone in There is currently no one working on OctoMap/octomap#1, so if you have an idea feel free to contribute! |
FYI: Fix is not included in the current indigo .deb, i.e. 0.3.2-0trusty-20160419-181158-0700 |
Good catch! That needs a new release, pending #6 |
New release on the way. |
Looking at https://github.com/OctoMap/octomap_msgs/blob/indigo-devel/include/octomap_msgs/conversions.h#L74, why does this have to be an OcTree? Can't we also have it be an AbstractOcTree similar to https://github.com/OctoMap/octomap_msgs/blob/indigo-devel/include/octomap_msgs/conversions.h#L55?
If there is no particular reason why this has to be, I am very happy to make a PR changing this to the more general AbstractOcTree (to then support e.g. ColorOcTrees).
The text was updated successfully, but these errors were encountered: