diff --git a/cartographer/mapping/sparse_pose_graph/constraint_builder.cc b/cartographer/mapping/pose_graph/constraint_builder.cc similarity index 95% rename from cartographer/mapping/sparse_pose_graph/constraint_builder.cc rename to cartographer/mapping/pose_graph/constraint_builder.cc index ec57f1a..d598f03 100644 --- a/cartographer/mapping/sparse_pose_graph/constraint_builder.cc +++ b/cartographer/mapping/pose_graph/constraint_builder.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "cartographer/mapping/sparse_pose_graph/constraint_builder.h" +#include "cartographer/mapping/pose_graph/constraint_builder.h" #include "cartographer/mapping_2d/scan_matching/ceres_scan_matcher.h" #include "cartographer/mapping_2d/scan_matching/fast_correlative_scan_matcher.h" @@ -24,7 +24,7 @@ namespace cartographer { namespace mapping { -namespace sparse_pose_graph { +namespace pose_graph { proto::ConstraintBuilderOptions CreateConstraintBuilderOptions( common::LuaParameterDictionary* const parameter_dictionary) { @@ -58,6 +58,6 @@ proto::ConstraintBuilderOptions CreateConstraintBuilderOptions( return options; } -} // namespace sparse_pose_graph +} // namespace pose_graph } // namespace mapping } // namespace cartographer diff --git a/cartographer/mapping/sparse_pose_graph/constraint_builder.h b/cartographer/mapping/pose_graph/constraint_builder.h similarity index 71% rename from cartographer/mapping/sparse_pose_graph/constraint_builder.h rename to cartographer/mapping/pose_graph/constraint_builder.h index 63820e4..9463e26 100644 --- a/cartographer/mapping/sparse_pose_graph/constraint_builder.h +++ b/cartographer/mapping/pose_graph/constraint_builder.h @@ -14,21 +14,21 @@ * limitations under the License. */ -#ifndef CARTOGRAPHER_MAPPING_SPARSE_POSE_GRAPH_CONSTRAINT_BUILDER_H_ -#define CARTOGRAPHER_MAPPING_SPARSE_POSE_GRAPH_CONSTRAINT_BUILDER_H_ +#ifndef CARTOGRAPHER_MAPPING_POSE_GRAPH_CONSTRAINT_BUILDER_H_ +#define CARTOGRAPHER_MAPPING_POSE_GRAPH_CONSTRAINT_BUILDER_H_ #include "cartographer/common/lua_parameter_dictionary.h" -#include "cartographer/mapping/sparse_pose_graph/proto/constraint_builder_options.pb.h" +#include "cartographer/mapping/pose_graph/proto/constraint_builder_options.pb.h" namespace cartographer { namespace mapping { -namespace sparse_pose_graph { +namespace pose_graph { proto::ConstraintBuilderOptions CreateConstraintBuilderOptions( common::LuaParameterDictionary* parameter_dictionary); -} // namespace sparse_pose_graph +} // namespace pose_graph } // namespace mapping } // namespace cartographer -#endif // CARTOGRAPHER_MAPPING_SPARSE_POSE_GRAPH_CONSTRAINT_BUILDER_H_ +#endif // CARTOGRAPHER_MAPPING_POSE_GRAPH_CONSTRAINT_BUILDER_H_ diff --git a/cartographer/mapping/sparse_pose_graph/optimization_problem_options.cc b/cartographer/mapping/pose_graph/optimization_problem_options.cc similarity index 93% rename from cartographer/mapping/sparse_pose_graph/optimization_problem_options.cc rename to cartographer/mapping/pose_graph/optimization_problem_options.cc index 349e45d..f535050 100644 --- a/cartographer/mapping/sparse_pose_graph/optimization_problem_options.cc +++ b/cartographer/mapping/pose_graph/optimization_problem_options.cc @@ -14,13 +14,13 @@ * limitations under the License. */ -#include "cartographer/mapping/sparse_pose_graph/optimization_problem_options.h" +#include "cartographer/mapping/pose_graph/optimization_problem_options.h" #include "cartographer/common/ceres_solver_options.h" namespace cartographer { namespace mapping { -namespace sparse_pose_graph { +namespace pose_graph { proto::OptimizationProblemOptions CreateOptimizationProblemOptions( common::LuaParameterDictionary* const parameter_dictionary) { @@ -48,6 +48,6 @@ proto::OptimizationProblemOptions CreateOptimizationProblemOptions( return options; } -} // namespace sparse_pose_graph +} // namespace pose_graph } // namespace mapping } // namespace cartographer diff --git a/cartographer/mapping/sparse_pose_graph/optimization_problem_options.h b/cartographer/mapping/pose_graph/optimization_problem_options.h similarity index 69% rename from cartographer/mapping/sparse_pose_graph/optimization_problem_options.h rename to cartographer/mapping/pose_graph/optimization_problem_options.h index f7b138c..42fe5e5 100644 --- a/cartographer/mapping/sparse_pose_graph/optimization_problem_options.h +++ b/cartographer/mapping/pose_graph/optimization_problem_options.h @@ -14,21 +14,21 @@ * limitations under the License. */ -#ifndef CARTOGRAPHER_MAPPING_SPARSE_POSE_GRAPH_OPTIMIZATION_PROBLEM_OPTIONS_H_ -#define CARTOGRAPHER_MAPPING_SPARSE_POSE_GRAPH_OPTIMIZATION_PROBLEM_OPTIONS_H_ +#ifndef CARTOGRAPHER_MAPPING_POSE_GRAPH_OPTIMIZATION_PROBLEM_OPTIONS_H_ +#define CARTOGRAPHER_MAPPING_POSE_GRAPH_OPTIMIZATION_PROBLEM_OPTIONS_H_ #include "cartographer/common/lua_parameter_dictionary.h" -#include "cartographer/mapping/sparse_pose_graph/proto/optimization_problem_options.pb.h" +#include "cartographer/mapping/pose_graph/proto/optimization_problem_options.pb.h" namespace cartographer { namespace mapping { -namespace sparse_pose_graph { +namespace pose_graph { proto::OptimizationProblemOptions CreateOptimizationProblemOptions( common::LuaParameterDictionary* parameter_dictionary); -} // namespace sparse_pose_graph +} // namespace pose_graph } // namespace mapping } // namespace cartographer -#endif // CARTOGRAPHER_MAPPING_SPARSE_POSE_GRAPH_OPTIMIZATION_PROBLEM_OPTIONS_H_ +#endif // CARTOGRAPHER_MAPPING_POSE_GRAPH_OPTIMIZATION_PROBLEM_OPTIONS_H_ diff --git a/cartographer/mapping/sparse_pose_graph/proto/constraint_builder_options.proto b/cartographer/mapping/pose_graph/proto/constraint_builder_options.proto similarity index 97% rename from cartographer/mapping/sparse_pose_graph/proto/constraint_builder_options.proto rename to cartographer/mapping/pose_graph/proto/constraint_builder_options.proto index 38d37c9..c2c357b 100644 --- a/cartographer/mapping/sparse_pose_graph/proto/constraint_builder_options.proto +++ b/cartographer/mapping/pose_graph/proto/constraint_builder_options.proto @@ -14,7 +14,7 @@ syntax = "proto3"; -package cartographer.mapping.sparse_pose_graph.proto; +package cartographer.mapping.pose_graph.proto; import "cartographer/mapping_2d/scan_matching/proto/ceres_scan_matcher_options.proto"; import "cartographer/mapping_2d/scan_matching/proto/fast_correlative_scan_matcher_options.proto"; diff --git a/cartographer/mapping/sparse_pose_graph/proto/optimization_problem_options.proto b/cartographer/mapping/pose_graph/proto/optimization_problem_options.proto similarity index 96% rename from cartographer/mapping/sparse_pose_graph/proto/optimization_problem_options.proto rename to cartographer/mapping/pose_graph/proto/optimization_problem_options.proto index fc98db2..4a8e68c 100644 --- a/cartographer/mapping/sparse_pose_graph/proto/optimization_problem_options.proto +++ b/cartographer/mapping/pose_graph/proto/optimization_problem_options.proto @@ -14,7 +14,7 @@ syntax = "proto3"; -package cartographer.mapping.sparse_pose_graph.proto; +package cartographer.mapping.pose_graph.proto; import "cartographer/common/proto/ceres_solver_options.proto"; diff --git a/cartographer/mapping/proto/sparse_pose_graph_options.proto b/cartographer/mapping/proto/sparse_pose_graph_options.proto index b614efd..41d48e2 100644 --- a/cartographer/mapping/proto/sparse_pose_graph_options.proto +++ b/cartographer/mapping/proto/sparse_pose_graph_options.proto @@ -16,8 +16,8 @@ syntax = "proto3"; package cartographer.mapping.proto; -import "cartographer/mapping/sparse_pose_graph/proto/constraint_builder_options.proto"; -import "cartographer/mapping/sparse_pose_graph/proto/optimization_problem_options.proto"; +import "cartographer/mapping/pose_graph/proto/constraint_builder_options.proto"; +import "cartographer/mapping/pose_graph/proto/optimization_problem_options.proto"; message SparsePoseGraphOptions { // Online loop closure: If positive, will run the loop closure while the map @@ -25,7 +25,7 @@ message SparsePoseGraphOptions { int32 optimize_every_n_scans = 1; // Options for the constraint builder. - mapping.sparse_pose_graph.proto.ConstraintBuilderOptions + mapping.pose_graph.proto.ConstraintBuilderOptions constraint_builder_options = 3; // Weight used in the optimization problem for the translational component of @@ -37,7 +37,7 @@ message SparsePoseGraphOptions { double matcher_rotation_weight = 8; // Options for the optimization problem. - mapping.sparse_pose_graph.proto.OptimizationProblemOptions + mapping.pose_graph.proto.OptimizationProblemOptions optimization_problem_options = 4; // Number of iterations to use in 'optimization_problem_options' for the final diff --git a/cartographer/mapping/sparse_pose_graph.cc b/cartographer/mapping/sparse_pose_graph.cc index 821b1e8..717df6e 100644 --- a/cartographer/mapping/sparse_pose_graph.cc +++ b/cartographer/mapping/sparse_pose_graph.cc @@ -16,8 +16,8 @@ #include "cartographer/mapping/sparse_pose_graph.h" -#include "cartographer/mapping/sparse_pose_graph/constraint_builder.h" -#include "cartographer/mapping/sparse_pose_graph/optimization_problem_options.h" +#include "cartographer/mapping/pose_graph/constraint_builder.h" +#include "cartographer/mapping/pose_graph/optimization_problem_options.h" #include "cartographer/transform/transform.h" #include "glog/logging.h" @@ -77,14 +77,14 @@ proto::SparsePoseGraphOptions CreateSparsePoseGraphOptions( options.set_optimize_every_n_scans( parameter_dictionary->GetInt("optimize_every_n_scans")); *options.mutable_constraint_builder_options() = - sparse_pose_graph::CreateConstraintBuilderOptions( + pose_graph::CreateConstraintBuilderOptions( parameter_dictionary->GetDictionary("constraint_builder").get()); options.set_matcher_translation_weight( parameter_dictionary->GetDouble("matcher_translation_weight")); options.set_matcher_rotation_weight( parameter_dictionary->GetDouble("matcher_rotation_weight")); *options.mutable_optimization_problem_options() = - sparse_pose_graph::CreateOptimizationProblemOptions( + pose_graph::CreateOptimizationProblemOptions( parameter_dictionary->GetDictionary("optimization_problem").get()); options.set_max_num_final_iterations( parameter_dictionary->GetNonNegativeInt("max_num_final_iterations")); diff --git a/cartographer/mapping_2d/sparse_pose_graph.cc b/cartographer/mapping_2d/sparse_pose_graph.cc index 36de8f9..d0c6f80 100644 --- a/cartographer/mapping_2d/sparse_pose_graph.cc +++ b/cartographer/mapping_2d/sparse_pose_graph.cc @@ -31,7 +31,7 @@ #include "Eigen/Eigenvalues" #include "cartographer/common/make_unique.h" #include "cartographer/common/math.h" -#include "cartographer/mapping/sparse_pose_graph/proto/constraint_builder_options.pb.h" +#include "cartographer/mapping/pose_graph/proto/constraint_builder_options.pb.h" #include "cartographer/sensor/compressed_point_cloud.h" #include "cartographer/sensor/voxel_filter.h" #include "glog/logging.h" diff --git a/cartographer/mapping_2d/sparse_pose_graph/constraint_builder.cc b/cartographer/mapping_2d/sparse_pose_graph/constraint_builder.cc index ffd780d..30c0412 100644 --- a/cartographer/mapping_2d/sparse_pose_graph/constraint_builder.cc +++ b/cartographer/mapping_2d/sparse_pose_graph/constraint_builder.cc @@ -43,7 +43,7 @@ transform::Rigid2d ComputeSubmapPose(const Submap& submap) { } ConstraintBuilder::ConstraintBuilder( - const mapping::sparse_pose_graph::proto::ConstraintBuilderOptions& options, + const mapping::pose_graph::proto::ConstraintBuilderOptions& options, common::ThreadPool* const thread_pool) : options_(options), thread_pool_(thread_pool), diff --git a/cartographer/mapping_2d/sparse_pose_graph/constraint_builder.h b/cartographer/mapping_2d/sparse_pose_graph/constraint_builder.h index 9dcf3fa..44f61d8 100644 --- a/cartographer/mapping_2d/sparse_pose_graph/constraint_builder.h +++ b/cartographer/mapping_2d/sparse_pose_graph/constraint_builder.h @@ -30,8 +30,8 @@ #include "cartographer/common/math.h" #include "cartographer/common/mutex.h" #include "cartographer/common/thread_pool.h" +#include "cartographer/mapping/pose_graph/proto/constraint_builder_options.pb.h" #include "cartographer/mapping/sparse_pose_graph.h" -#include "cartographer/mapping/sparse_pose_graph/proto/constraint_builder_options.pb.h" #include "cartographer/mapping_2d/scan_matching/ceres_scan_matcher.h" #include "cartographer/mapping_2d/scan_matching/fast_correlative_scan_matcher.h" #include "cartographer/mapping_2d/submaps.h" @@ -62,8 +62,7 @@ class ConstraintBuilder { using Result = std::vector; ConstraintBuilder( - const mapping::sparse_pose_graph::proto::ConstraintBuilderOptions& - options, + const mapping::pose_graph::proto::ConstraintBuilderOptions& options, common::ThreadPool* thread_pool); ~ConstraintBuilder(); @@ -142,7 +141,7 @@ class ConstraintBuilder { // runs the 'when_done_' callback and resets the state. void FinishComputation(int computation_index) EXCLUDES(mutex_); - const mapping::sparse_pose_graph::proto::ConstraintBuilderOptions options_; + const mapping::pose_graph::proto::ConstraintBuilderOptions options_; common::ThreadPool* thread_pool_; common::Mutex mutex_; diff --git a/cartographer/mapping_2d/sparse_pose_graph/optimization_problem.cc b/cartographer/mapping_2d/sparse_pose_graph/optimization_problem.cc index a1d76d0..4fa1b2e 100644 --- a/cartographer/mapping_2d/sparse_pose_graph/optimization_problem.cc +++ b/cartographer/mapping_2d/sparse_pose_graph/optimization_problem.cc @@ -55,8 +55,7 @@ transform::Rigid2d ToPose(const std::array& values) { } // namespace OptimizationProblem::OptimizationProblem( - const mapping::sparse_pose_graph::proto::OptimizationProblemOptions& - options) + const mapping::pose_graph::proto::OptimizationProblemOptions& options) : options_(options) {} OptimizationProblem::~OptimizationProblem() {} diff --git a/cartographer/mapping_2d/sparse_pose_graph/optimization_problem.h b/cartographer/mapping_2d/sparse_pose_graph/optimization_problem.h index e4923e8..8b25631 100644 --- a/cartographer/mapping_2d/sparse_pose_graph/optimization_problem.h +++ b/cartographer/mapping_2d/sparse_pose_graph/optimization_problem.h @@ -28,8 +28,8 @@ #include "cartographer/common/port.h" #include "cartographer/common/time.h" #include "cartographer/mapping/id.h" +#include "cartographer/mapping/pose_graph/proto/optimization_problem_options.pb.h" #include "cartographer/mapping/sparse_pose_graph.h" -#include "cartographer/mapping/sparse_pose_graph/proto/optimization_problem_options.pb.h" #include "cartographer/sensor/imu_data.h" #include "cartographer/sensor/map_by_time.h" #include "cartographer/sensor/odometry_data.h" @@ -56,8 +56,7 @@ class OptimizationProblem { using Constraint = mapping::SparsePoseGraph::Constraint; explicit OptimizationProblem( - const mapping::sparse_pose_graph::proto::OptimizationProblemOptions& - options); + const mapping::pose_graph::proto::OptimizationProblemOptions& options); ~OptimizationProblem(); OptimizationProblem(const OptimizationProblem&) = delete; @@ -100,7 +99,7 @@ class OptimizationProblem { int trajectory_id, const NodeData& first_node_data, const NodeData& second_node_data) const; - mapping::sparse_pose_graph::proto::OptimizationProblemOptions options_; + mapping::pose_graph::proto::OptimizationProblemOptions options_; mapping::MapById node_data_; mapping::MapById submap_data_; sensor::MapByTime imu_data_; diff --git a/cartographer/mapping_3d/sparse_pose_graph.cc b/cartographer/mapping_3d/sparse_pose_graph.cc index 83301a8..c9ae1e7 100644 --- a/cartographer/mapping_3d/sparse_pose_graph.cc +++ b/cartographer/mapping_3d/sparse_pose_graph.cc @@ -30,7 +30,7 @@ #include "Eigen/Eigenvalues" #include "cartographer/common/make_unique.h" #include "cartographer/common/math.h" -#include "cartographer/mapping/sparse_pose_graph/proto/constraint_builder_options.pb.h" +#include "cartographer/mapping/pose_graph/proto/constraint_builder_options.pb.h" #include "cartographer/sensor/compressed_point_cloud.h" #include "cartographer/sensor/voxel_filter.h" #include "glog/logging.h" diff --git a/cartographer/mapping_3d/sparse_pose_graph/constraint_builder.cc b/cartographer/mapping_3d/sparse_pose_graph/constraint_builder.cc index 244eee9..d5e41e7 100644 --- a/cartographer/mapping_3d/sparse_pose_graph/constraint_builder.cc +++ b/cartographer/mapping_3d/sparse_pose_graph/constraint_builder.cc @@ -39,7 +39,7 @@ namespace mapping_3d { namespace sparse_pose_graph { ConstraintBuilder::ConstraintBuilder( - const mapping::sparse_pose_graph::proto::ConstraintBuilderOptions& options, + const mapping::pose_graph::proto::ConstraintBuilderOptions& options, common::ThreadPool* const thread_pool) : options_(options), thread_pool_(thread_pool), diff --git a/cartographer/mapping_3d/sparse_pose_graph/constraint_builder.h b/cartographer/mapping_3d/sparse_pose_graph/constraint_builder.h index 4c64312..a01886f 100644 --- a/cartographer/mapping_3d/sparse_pose_graph/constraint_builder.h +++ b/cartographer/mapping_3d/sparse_pose_graph/constraint_builder.h @@ -58,8 +58,7 @@ class ConstraintBuilder { using Result = std::vector; ConstraintBuilder( - const mapping::sparse_pose_graph::proto::ConstraintBuilderOptions& - options, + const mapping::pose_graph::proto::ConstraintBuilderOptions& options, common::ThreadPool* thread_pool); ~ConstraintBuilder(); @@ -153,7 +152,7 @@ class ConstraintBuilder { // runs the 'when_done_' callback and resets the state. void FinishComputation(int computation_index) EXCLUDES(mutex_); - const mapping::sparse_pose_graph::proto::ConstraintBuilderOptions options_; + const mapping::pose_graph::proto::ConstraintBuilderOptions options_; common::ThreadPool* thread_pool_; common::Mutex mutex_; diff --git a/cartographer/mapping_3d/sparse_pose_graph/optimization_problem.cc b/cartographer/mapping_3d/sparse_pose_graph/optimization_problem.cc index 6de739d..ce70da0 100644 --- a/cartographer/mapping_3d/sparse_pose_graph/optimization_problem.cc +++ b/cartographer/mapping_3d/sparse_pose_graph/optimization_problem.cc @@ -74,8 +74,7 @@ std::unique_ptr Interpolate( } // namespace OptimizationProblem::OptimizationProblem( - const mapping::sparse_pose_graph::proto::OptimizationProblemOptions& - options, + const mapping::pose_graph::proto::OptimizationProblemOptions& options, FixZ fix_z) : options_(options), fix_z_(fix_z) {} diff --git a/cartographer/mapping_3d/sparse_pose_graph/optimization_problem.h b/cartographer/mapping_3d/sparse_pose_graph/optimization_problem.h index d4f25cf..199315c 100644 --- a/cartographer/mapping_3d/sparse_pose_graph/optimization_problem.h +++ b/cartographer/mapping_3d/sparse_pose_graph/optimization_problem.h @@ -28,8 +28,8 @@ #include "cartographer/common/port.h" #include "cartographer/common/time.h" #include "cartographer/mapping/id.h" +#include "cartographer/mapping/pose_graph/proto/optimization_problem_options.pb.h" #include "cartographer/mapping/sparse_pose_graph.h" -#include "cartographer/mapping/sparse_pose_graph/proto/optimization_problem_options.pb.h" #include "cartographer/sensor/fixed_frame_pose_data.h" #include "cartographer/sensor/imu_data.h" #include "cartographer/sensor/map_by_time.h" @@ -58,8 +58,7 @@ class OptimizationProblem { enum class FixZ { kYes, kNo }; OptimizationProblem( - const mapping::sparse_pose_graph::proto::OptimizationProblemOptions& - options, + const mapping::pose_graph::proto::OptimizationProblemOptions& options, FixZ fix_z); ~OptimizationProblem(); @@ -107,7 +106,7 @@ class OptimizationProblem { std::array imu_calibration{{1., 0., 0., 0.}}; }; - mapping::sparse_pose_graph::proto::OptimizationProblemOptions options_; + mapping::pose_graph::proto::OptimizationProblemOptions options_; FixZ fix_z_; mapping::MapById node_data_; mapping::MapById submap_data_; diff --git a/cartographer/mapping_3d/sparse_pose_graph/optimization_problem_test.cc b/cartographer/mapping_3d/sparse_pose_graph/optimization_problem_test.cc index ed01c89..ce26853 100644 --- a/cartographer/mapping_3d/sparse_pose_graph/optimization_problem_test.cc +++ b/cartographer/mapping_3d/sparse_pose_graph/optimization_problem_test.cc @@ -21,7 +21,7 @@ #include "Eigen/Core" #include "cartographer/common/lua_parameter_dictionary_test_helpers.h" #include "cartographer/common/time.h" -#include "cartographer/mapping/sparse_pose_graph/optimization_problem_options.h" +#include "cartographer/mapping/pose_graph/optimization_problem_options.h" #include "cartographer/transform/transform.h" #include "glog/logging.h" #include "gmock/gmock.h" @@ -37,8 +37,7 @@ class OptimizationProblemTest : public ::testing::Test { : optimization_problem_(CreateOptions(), OptimizationProblem::FixZ::kNo), rng_(45387) {} - mapping::sparse_pose_graph::proto::OptimizationProblemOptions - CreateOptions() { + mapping::pose_graph::proto::OptimizationProblemOptions CreateOptions() { auto parameter_dictionary = common::MakeDictionary(R"text( return { acceleration_weight = 1e-4, @@ -55,7 +54,7 @@ class OptimizationProblemTest : public ::testing::Test { num_threads = 4, }, })text"); - return mapping::sparse_pose_graph::CreateOptimizationProblemOptions( + return mapping::pose_graph::CreateOptimizationProblemOptions( parameter_dictionary.get()); }