Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/projective_integrator' i…
Browse files Browse the repository at this point in the history
…nto feature/temporal_window
  • Loading branch information
victorreijgwart committed May 28, 2021
2 parents 4c6b0d3 + 580392e commit f037e07
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef VOXBLOX_INCLUDE_VOXBLOX_INTEGRATOR_PROJECTIVE_TSDF_INTEGRATOR_INL_H_
#define VOXBLOX_INCLUDE_VOXBLOX_INTEGRATOR_PROJECTIVE_TSDF_INTEGRATOR_INL_H_
#ifndef VOXBLOX_INTEGRATOR_PROJECTIVE_TSDF_INTEGRATOR_INL_H_
#define VOXBLOX_INTEGRATOR_PROJECTIVE_TSDF_INTEGRATOR_INL_H_

#include <algorithm>
#include <iostream>
Expand Down Expand Up @@ -273,8 +273,7 @@ void ProjectiveTsdfIntegrator<interpolation_scheme>::updateTsdfVoxel(
}

// Truncate the new total voxel weight according to the max weight
const float new_voxel_weight =
std::min(tsdf_voxel->weight + observation_weight, config_.max_weight);
const float new_voxel_weight = tsdf_voxel->weight + observation_weight;

// Make sure voxels go back to zero when deintegrating
if (deintegrate && new_voxel_weight < 1e-3) {
Expand All @@ -288,7 +287,7 @@ void ProjectiveTsdfIntegrator<interpolation_scheme>::updateTsdfVoxel(
std::min(config_.default_truncation_distance, sdf) *
observation_weight) /
new_voxel_weight;
tsdf_voxel->weight = new_voxel_weight;
tsdf_voxel->weight = std::min(new_voxel_weight, config_.max_weight);
}

template <InterpolationScheme interpolation_scheme>
Expand Down Expand Up @@ -504,4 +503,4 @@ ProjectiveTsdfIntegrator<InterpolationScheme::kAdaptive>::interpolate(
}
} // namespace voxblox

#endif // VOXBLOX_INCLUDE_VOXBLOX_INTEGRATOR_PROJECTIVE_TSDF_INTEGRATOR_INL_H_
#endif // VOXBLOX_INTEGRATOR_PROJECTIVE_TSDF_INTEGRATOR_INL_H_

0 comments on commit f037e07

Please sign in to comment.