VoxelMap icon indicating copy to clipboard operation
VoxelMap copied to clipboard

`update_plane` in released code does not check the plane consistancy as described in paper

Open LarryDong opened this issue 4 months ago • 0 comments

Hi, thanks for releasing the code.

After carefully comparing the codes and the paper, I found:

  1. init_plane function, calculate the plane's (n,q) and cov, when initalizating or updating the octree, which is the same as paper's description.
  2. update_plane function, calculate the plane's (n,q) without cov. This function is only called in updateOctoTree when (the node is the largest layer & not a plane & no-updating the cov). But as the paper descirbed, there should be a function that "check the plane consistancy, and then only update the (n,q) if the same plane. The update_plane doesn't do this.

Thus, I think there are two issues that incosistant with the paper:

  1. The update_plane function should check plane consistancy first, but not directly re-calcuate the paramter. I can still find some "old" variables here:
Eigen::Matrix3d old_covariance = plane->covariance;

in Line 247 of "voxel_map_util.hpp"

  1. The update_plane should be called in another place (Line 402 in UpdateOctoTree:
if (new_points_num_ > update_size_threshold_) {
    if (update_cov_enable_) {
        init_plane(temp_points_, plane_ptr_);
    }
    //** there should be "update_plane" if `update_cov_enable_` is false. **//
    new_points_num_ = 0;
}

In this cases, the cov do not need to be update, but only update the (n,q).

Could someone explain what's the motivation that the code is not consistant with the original paper. Thanks.

LarryDong avatar Sep 29 '24 08:09 LarryDong