Rename Constraint::i -> submap_id. (#274)

Related to #256.
master
Holger Rapp 2017-05-11 11:43:47 +02:00 committed by GitHub
parent 660eb341ff
commit 95f0d013c6
4 changed files with 9 additions and 11 deletions

View File

@ -93,9 +93,9 @@ proto::SparsePoseGraph SparsePoseGraph::ToProto() {
constraint.pose.sqrt_Lambda_ij; constraint.pose.sqrt_Lambda_ij;
constraint_proto->mutable_submap_id()->set_trajectory_id( constraint_proto->mutable_submap_id()->set_trajectory_id(
constraint.i.trajectory_id); constraint.submap_id.trajectory_id);
constraint_proto->mutable_submap_id()->set_submap_index( constraint_proto->mutable_submap_id()->set_submap_index(
constraint.i.submap_index); constraint.submap_id.submap_index);
constraint_proto->mutable_scan_id()->set_trajectory_id( constraint_proto->mutable_scan_id()->set_trajectory_id(
grouped_node_indices[constraint.j].first); grouped_node_indices[constraint.j].first);

View File

@ -58,9 +58,7 @@ class SparsePoseGraph {
Eigen::Matrix<double, 6, 6> sqrt_Lambda_ij; Eigen::Matrix<double, 6, 6> sqrt_Lambda_ij;
}; };
// TODO(hrapp): Rename to 'submap_id' and mention that the paper calls this mapping::SubmapId submap_id; // 'i' in the paper.
// 'i'.
mapping::SubmapId i;
// Scan index. // Scan index.
int j; int j;

View File

@ -139,8 +139,8 @@ void OptimizationProblem::Solve(const std::vector<Constraint>& constraints) {
constraint.tag == Constraint::INTER_SUBMAP constraint.tag == Constraint::INTER_SUBMAP
? new ceres::HuberLoss(options_.huber_scale()) ? new ceres::HuberLoss(options_.huber_scale())
: nullptr, : nullptr,
C_submaps.at(constraint.i.trajectory_id) C_submaps.at(constraint.submap_id.trajectory_id)
.at(constraint.i.submap_index) .at(constraint.submap_id.submap_index)
.data(), .data(),
C_point_clouds[constraint.j].data()); C_point_clouds[constraint.j].data());
} }

View File

@ -175,11 +175,11 @@ void OptimizationProblem::Solve(const std::vector<Constraint>& constraints) {
constraint.tag == Constraint::INTER_SUBMAP constraint.tag == Constraint::INTER_SUBMAP
? new ceres::HuberLoss(options_.huber_scale()) ? new ceres::HuberLoss(options_.huber_scale())
: nullptr, : nullptr,
C_submaps.at(constraint.i.trajectory_id) C_submaps.at(constraint.submap_id.trajectory_id)
.at(constraint.i.submap_index) .at(constraint.submap_id.submap_index)
.rotation(), .rotation(),
C_submaps.at(constraint.i.trajectory_id) C_submaps.at(constraint.submap_id.trajectory_id)
.at(constraint.i.submap_index) .at(constraint.submap_id.submap_index)
.translation(), .translation(),
C_point_clouds[constraint.j].rotation(), C_point_clouds[constraint.j].rotation(),
C_point_clouds[constraint.j].translation()); C_point_clouds[constraint.j].translation());