-
Notifications
You must be signed in to change notification settings - Fork 693
Adds IntensityOcTree: per-voxel intensity payload for OctoMap #435
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
base: devel
Are you sure you want to change the base?
Conversation
|
Thanks! Any chance to add a few unit tests well? |
Adds a new Octree implementation that stores intensity values in addition to occupancy probability. This new tree type allows for representing intensity information alongside spatial occupancy, enabling applications that require both geometric and radiometric data.
Ensures that intensity values are correctly propagated to child nodes when expanding an IntensityOcTreeNode. This change addresses a potential issue where newly created child nodes in an expanded node would not inherit the intensity of their parent, leading to inaccurate intensity representation in the octree.
Adds methods for intensity integration, pruning, and averaging in IntensityOcTree, enhancing node management and data consistency. Also introduces a small epsilon value to avoid division by zero. Removes unused intensity integration method Removes the unused `integrateNodeIntensity` method that takes an `IntensityOcTreeNode` and weight as input. This simplifies the API and removes potentially confusing or redundant methods.
Updates inner node occupancy recursively for intensity octrees. This change ensures that the intensity values of inner nodes are correctly updated based on the children's values, leading to a more accurate representation of the intensity distribution in the octree.
Adds a `computeUpdateKeys` method to `IntensityOcTree`. This method allows to compute the set of free and occupied cells corresponding to a pointcloud, using an alternative interface based on octomath vectors.
Improves the efficiency of the inner node occupancy update process by adding a condition to check for the presence of children before recursively updating occupancy. This avoids unnecessary processing when a node has no children, leading to performance gains, especially in sparse octrees.
eb06b0e to
540f48a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new IntensityOcTree class that extends OctoMap with per-voxel intensity storage, mirroring the design of the existing ColorOcTree but storing a single double intensity value per leaf node instead of RGB color values.
Key Changes:
- Introduces
IntensityOcTreeNodewith intensity payload and weighted averaging based on occupancy probability - Implements
IntensityOcTreewith integration, pruning, and inner node update functionality - Follows the same API patterns as
ColorOcTreefor consistency
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 13 comments.
| File | Description |
|---|---|
| octomap/include/octomap/IntensityOcTree.h | Declares IntensityOcTreeNode and IntensityOcTree classes with intensity storage, getters/setters, serialization methods, and tree operations |
| octomap/src/IntensityOcTree.cpp | Implements I/O operations, intensity averaging, node integration with occupancy-weighted updates, and pruning logic |
| octomap/src/CMakeLists.txt | Adds IntensityOcTree.cpp to the build sources list |
Critical Issues Identified:
- Missing static member definition will cause linker errors
- Inline function defined in .cpp instead of header
- Intensity integration formula inconsistent with ColorOcTree and doesn't properly weight values
- Floating-point equality comparison in operator==
- Ambiguous "unset" intensity state (0.0 treated as unset)
- Missing test coverage despite comprehensive tests existing for similar ColorOcTree
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Adds a new IntensityOcTree / IntensityOcTreeNode that stores a single double intensity per leaf (same layout & API style as ColorOcTree).