Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/vio.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ class VIOManager

double img_point_cov, outlier_threshold, ncc_thre;

float plane_voxel_size;

SubSparseMap *visual_submap;
std::vector<std::vector<V3D>> rays_with_sample_points;

Expand Down
1 change: 1 addition & 0 deletions src/LIVMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ void LIVMapper::initializeComponents()
vio_manager->grid_n_width = grid_n_width;
vio_manager->grid_n_height = grid_n_height;
vio_manager->patch_pyrimid_level = patch_pyrimid_level;
vio_manager->plane_voxel_size = voxelmap_manager->config_setting_.max_voxel_size_;
vio_manager->exposure_estimate_en = exposure_estimate_en;
vio_manager->colmap_output_en = colmap_output_en;
vio_manager->initializeVIO();
Expand Down
7 changes: 6 additions & 1 deletion src/vio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,11 @@ void VIOManager::retrieveFromVisualSparseMap(cv::Mat img, vector<pointWithVar> &
}
else
{
for (int j = 0; j < 3; j++)
{
loc_xyz[j] = floor(sample_point_w[j] / plane_voxel_size);
if (loc_xyz[j] < 0) { loc_xyz[j] -= 1.0; }
}
VOXEL_LOCATION sample_pos(loc_xyz[0], loc_xyz[1], loc_xyz[2]);
auto iter = plane_map.find(sample_pos);
if (iter != plane_map.end())
Expand Down Expand Up @@ -983,7 +988,7 @@ void VIOManager::updateReferencePatch(const unordered_map<VOXEL_LOCATION, VoxelO
float loc_xyz[3];
for (int j = 0; j < 3; j++)
{
loc_xyz[j] = p_w[j] / 0.5;
loc_xyz[j] = p_w[j] / plane_voxel_size;
if (loc_xyz[j] < 0) { loc_xyz[j] -= 1.0; }
}
VOXEL_LOCATION position((int64_t)loc_xyz[0], (int64_t)loc_xyz[1], (int64_t)loc_xyz[2]);
Expand Down