From 9b61e4fbaf0da2d502b7595adc47c53075c83eae Mon Sep 17 00:00:00 2001 From: Mikhail Kiselyov Date: Sun, 12 Nov 2023 15:46:10 +0300 Subject: [PATCH] add comments --- octreelib/octree_manager/octree_manager.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/octreelib/octree_manager/octree_manager.py b/octreelib/octree_manager/octree_manager.py index e8a3385..7ad0325 100644 --- a/octreelib/octree_manager/octree_manager.py +++ b/octreelib/octree_manager/octree_manager.py @@ -10,6 +10,13 @@ class OctreeManager(VoxelBase): + """ + Octree manager which stores octrees for different poses. + + :param octree_config: Octree configuration. + :param corner_min: Minimum corner of the node. + :param edge_length: Edge length of the node. + """ def __init__( self, octree_config: OctreeConfig, corner_min: Point, edge_length: float ): @@ -23,6 +30,11 @@ def subdivide( subdivision_criteria: List[Callable[[PointCloud], bool]], pose_numbers: Optional[List[int]], ): + """ + Subdivide all nodes based on the subdivision criteria. + :param subdivision_criteria: list of criteria for subdivision + :param pose_numbers: List of pose numbers to subdivide + """ if pose_numbers is None: pose_numbers = self._octrees.keys() @@ -45,6 +57,11 @@ def map_leaf_points( function: Callable[[PointCloud], PointCloud], pose_numbers: Optional[List[int]] = None, ): + """ + Transform point cloud in the node using the function + :param function: Function PointCloud -> PointCloud + :param pose_numbers: List of pose numbers to transform + """ if pose_numbers is None: pose_numbers = self._octrees.keys() @@ -56,6 +73,11 @@ def filter( filtering_criteria: List[Callable[[PointCloud], bool]], pose_numbers: Optional[List[int]], ): + """ + Filter nodes with points by filtering criteria + :param filtering_criteria: List of filtering criteria functions + :param pose_numbers: List of pose numbers to filter + """ if pose_numbers is None: pose_numbers = self._octrees.keys()