mapping_3d/sparse_pose_graph/optimization_problem.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 The Cartographer Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CARTOGRAPHER_MAPPING_3D_SPARSE_POSE_GRAPH_OPTIMIZATION_PROBLEM_H_
18 #define CARTOGRAPHER_MAPPING_3D_SPARSE_POSE_GRAPH_OPTIMIZATION_PROBLEM_H_
19 
20 #include <array>
21 #include <deque>
22 #include <map>
23 #include <vector>
24 
25 #include "Eigen/Core"
26 #include "Eigen/Geometry"
30 #include "cartographer/mapping/sparse_pose_graph/proto/optimization_problem_options.pb.h"
32 
33 namespace cartographer {
34 namespace mapping_3d {
35 namespace sparse_pose_graph {
36 
37 struct NodeData {
40 };
41 
42 struct SubmapData {
44 };
45 
46 // Implements the SPA loop closure method.
48  public:
50 
51  enum class FixZ { kYes, kNo };
52 
54  const mapping::sparse_pose_graph::proto::OptimizationProblemOptions&
55  options,
56  FixZ fix_z);
58 
60  OptimizationProblem& operator=(const OptimizationProblem&) = delete;
61 
62  void AddImuData(int trajectory_id, common::Time time,
63  const Eigen::Vector3d& linear_acceleration,
64  const Eigen::Vector3d& angular_velocity);
65  void AddTrajectoryNode(int trajectory_id, common::Time time,
67  void AddSubmap(int trajectory_id, const transform::Rigid3d& submap_pose);
68 
69  void SetMaxNumIterations(int32 max_num_iterations);
70 
71  // Computes the optimized poses.
72  void Solve(const std::vector<Constraint>& constraints);
73 
74  const std::vector<std::vector<NodeData>>& node_data() const;
75  const std::vector<std::vector<SubmapData>>& submap_data() const;
76 
77  private:
78  mapping::sparse_pose_graph::proto::OptimizationProblemOptions options_;
80  std::vector<std::deque<ImuData>> imu_data_;
81  std::vector<std::vector<NodeData>> node_data_;
82  std::vector<std::vector<SubmapData>> submap_data_;
83  double gravity_constant_ = 9.8;
84 };
85 
86 } // namespace sparse_pose_graph
87 } // namespace mapping_3d
88 } // namespace cartographer
89 
90 #endif // CARTOGRAPHER_MAPPING_3D_SPARSE_POSE_GRAPH_OPTIMIZATION_PROBLEM_H_
int32_t int32
Definition: port.h:30
UniversalTimeScaleClock::time_point Time
Definition: time.h:44


cartographer
Author(s):
autogenerated on Wed Jun 5 2019 21:57:58