Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CARTOGRAPHER_MAPPING_POSE_GRAPH_DATA_H_
00018 #define CARTOGRAPHER_MAPPING_POSE_GRAPH_DATA_H_
00019
00020 #include <map>
00021 #include <set>
00022 #include <vector>
00023
00024 #include "cartographer/mapping/internal/optimization/optimization_problem_2d.h"
00025 #include "cartographer/mapping/internal/optimization/optimization_problem_3d.h"
00026 #include "cartographer/mapping/internal/trajectory_connectivity_state.h"
00027 #include "cartographer/mapping/pose_graph.h"
00028 #include "cartographer/mapping/pose_graph_interface.h"
00029 #include "cartographer/mapping/submaps.h"
00030
00031 namespace cartographer {
00032 namespace mapping {
00033
00034
00035
00036
00037
00038 enum class SubmapState { kNoConstraintSearch, kFinished };
00039
00040 struct InternalTrajectoryState {
00041 enum class DeletionState {
00042 NORMAL,
00043 SCHEDULED_FOR_DELETION,
00044 WAIT_FOR_DELETION
00045 };
00046
00047 PoseGraphInterface::TrajectoryState state =
00048 PoseGraphInterface::TrajectoryState::ACTIVE;
00049 DeletionState deletion_state = DeletionState::NORMAL;
00050 };
00051
00052 struct InternalSubmapData {
00053 std::shared_ptr<const Submap> submap;
00054 SubmapState state = SubmapState::kNoConstraintSearch;
00055
00056
00057
00058
00059 std::set<NodeId> node_ids;
00060 };
00061
00062 struct PoseGraphData {
00063
00064
00065 MapById<SubmapId, InternalSubmapData> submap_data;
00066
00067
00068 MapById<SubmapId, optimization::SubmapSpec2D> global_submap_poses_2d;
00069 MapById<SubmapId, optimization::SubmapSpec3D> global_submap_poses_3d;
00070
00071
00072 MapById<NodeId, TrajectoryNode> trajectory_nodes;
00073
00074
00075 std::map<std::string , PoseGraphInterface::LandmarkNode>
00076 landmark_nodes;
00077
00078
00079 TrajectoryConnectivityState trajectory_connectivity_state;
00080 int num_trajectory_nodes = 0;
00081 std::map<int, InternalTrajectoryState> trajectories_state;
00082
00083
00084 std::map<int, PoseGraph::InitialTrajectoryPose> initial_trajectory_poses;
00085
00086 std::vector<PoseGraphInterface::Constraint> constraints;
00087 };
00088
00089 }
00090 }
00091
00092 #endif // CARTOGRAPHER_MAPPING_POSE_GRAPH_DATA_H_