optimization_problem_interface.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 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_INTERNAL_OPTIMIZATION_OPTIMIZATION_PROBLEM_INTERFACE_H_
18 #define CARTOGRAPHER_MAPPING_INTERNAL_OPTIMIZATION_OPTIMIZATION_PROBLEM_INTERFACE_H_
19 
20 #include <map>
21 #include <set>
22 #include <vector>
23 
24 #include "Eigen/Core"
25 #include "Eigen/Geometry"
33 
34 namespace cartographer {
35 namespace mapping {
36 namespace optimization {
37 
38 // Implements the SPA loop closure method.
39 template <typename NodeDataType, typename SubmapDataType,
40  typename RigidTransformType>
42  public:
45 
48 
51  delete;
52 
53  virtual void AddImuData(int trajectory_id,
54  const sensor::ImuData& imu_data) = 0;
55  virtual void AddOdometryData(int trajectory_id,
57  virtual void AddTrajectoryNode(int trajectory_id,
58  const NodeDataType& node_data) = 0;
59  virtual void InsertTrajectoryNode(const NodeId& node_id,
60  const NodeDataType& node_data) = 0;
61  virtual void TrimTrajectoryNode(const NodeId& node_id) = 0;
62  virtual void AddSubmap(int trajectory_id,
63  const RigidTransformType& global_submap_pose) = 0;
64  virtual void InsertSubmap(const SubmapId& submap_id,
65  const RigidTransformType& global_submap_pose) = 0;
66  virtual void TrimSubmap(const SubmapId& submap_id) = 0;
67  virtual void SetMaxNumIterations(int32 max_num_iterations) = 0;
68 
69  // Optimizes the global poses.
70  virtual void Solve(
71  const std::vector<Constraint>& constraints,
72  const std::set<int>& frozen_trajectories,
73  const std::map<std::string, LandmarkNode>& landmark_nodes) = 0;
74 
75  virtual const MapById<NodeId, NodeDataType>& node_data() const = 0;
76  virtual const MapById<SubmapId, SubmapDataType>& submap_data() const = 0;
77  virtual const std::map<std::string, transform::Rigid3d>& landmark_data()
78  const = 0;
79  virtual const sensor::MapByTime<sensor::ImuData>& imu_data() const = 0;
81  const = 0;
82 };
83 
84 } // namespace optimization
85 } // namespace mapping
86 } // namespace cartographer
87 
88 #endif // CARTOGRAPHER_MAPPING_INTERNAL_OPTIMIZATION_OPTIMIZATION_PROBLEM_INTERFACE_H_
virtual const sensor::MapByTime< sensor::OdometryData > & odometry_data() const =0
virtual const MapById< NodeId, NodeDataType > & node_data() const =0
virtual const MapById< SubmapId, SubmapDataType > & submap_data() const =0
virtual void AddTrajectoryNode(int trajectory_id, const NodeDataType &node_data)=0
virtual void SetMaxNumIterations(int32 max_num_iterations)=0
virtual void InsertTrajectoryNode(const NodeId &node_id, const NodeDataType &node_data)=0
virtual void AddImuData(int trajectory_id, const sensor::ImuData &imu_data)=0
virtual const std::map< std::string, transform::Rigid3d > & landmark_data() const =0
OptimizationProblemInterface & operator=(const OptimizationProblemInterface &)=delete
virtual void TrimSubmap(const SubmapId &submap_id)=0
virtual const sensor::MapByTime< sensor::ImuData > & imu_data() const =0
virtual void Solve(const std::vector< Constraint > &constraints, const std::set< int > &frozen_trajectories, const std::map< std::string, LandmarkNode > &landmark_nodes)=0
virtual void AddSubmap(int trajectory_id, const RigidTransformType &global_submap_pose)=0
virtual void AddOdometryData(int trajectory_id, const sensor::OdometryData &odometry_data)=0
int32_t int32
Definition: port.h:32
virtual void InsertSubmap(const SubmapId &submap_id, const RigidTransformType &global_submap_pose)=0


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:58