Skip to content

Commit

Permalink
Merge branch 'master' into devel/hnsw_ann_search
Browse files Browse the repository at this point in the history
  • Loading branch information
smauq authored Apr 18, 2023
2 parents 602bca6 + 4b3bfd1 commit a32d7f6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,15 @@ void addLandmarkTermForKeypoint(
visual_frame.getKeypointMeasurement(keypoint_idx);

intrinsics_params = camera_ptr->getParametersMutable();

// Visual landmarks have these additional cost term arguments
cost_term_args.emplace_back(intrinsics_params);
if (camera_ptr->getDistortion().getType() !=
aslam::Distortion::Type::kNoDistortion) {
distortion_params =
camera_ptr->getDistortionMutable()->getParametersMutable();
CHECK_NOTNULL(distortion_params);
cost_term_args.emplace_back(distortion_params);
}

landmark_term_cost = std::shared_ptr<ceres::CostFunction>(
Expand All @@ -135,10 +139,6 @@ void addLandmarkTermForKeypoint(
camera_ptr.get()));

residual_type = ceres_error_terms::ResidualType::kVisualReprojectionError;

// Visual landmarks have these additional cost term arguments
cost_term_args.emplace_back(intrinsics_params);
cost_term_args.emplace_back(distortion_params);
} else {
const int64_t offset = visual_frame.getKeypointTimeOffset(keypoint_idx);

Expand Down

0 comments on commit a32d7f6

Please sign in to comment.