Open3D (C++ API)  0.17.0
PoseGraph.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <memory>
11 #include <vector>
12 
13 #include "open3d/utility/Eigen.h"
15 
16 namespace open3d {
17 namespace pipelines {
18 namespace registration {
19 
24 public:
26  PoseGraphNode(const Eigen::Matrix4d &pose = Eigen::Matrix4d::Identity())
27  : pose_(pose) {}
29 
30 public:
31  bool ConvertToJsonValue(Json::Value &value) const override;
32  bool ConvertFromJsonValue(const Json::Value &value) override;
33 
34 public:
35  Eigen::Matrix4d_u pose_;
36 };
37 
42 public:
52  int source_node_id = -1,
53  int target_node_id = -1,
54  const Eigen::Matrix4d &transformation = Eigen::Matrix4d::Identity(),
55  const Eigen::Matrix6d &information = Eigen::Matrix6d::Identity(),
56  bool uncertain = false,
57  double confidence = 1.0)
58  : source_node_id_(source_node_id),
59  target_node_id_(target_node_id),
60  transformation_(transformation),
61  information_(information),
62  uncertain_(uncertain),
63  confidence_(confidence) {}
65 
66 public:
67  bool ConvertToJsonValue(Json::Value &value) const override;
68  bool ConvertFromJsonValue(const Json::Value &value) override;
69 
70 public:
76  Eigen::Matrix4d_u transformation_;
78  Eigen::Matrix6d_u information_;
83  bool uncertain_;
90  double confidence_;
91 };
92 
97 public:
99  PoseGraph();
100  ~PoseGraph() override;
101 
102 public:
103  bool ConvertToJsonValue(Json::Value &value) const override;
104  bool ConvertFromJsonValue(const Json::Value &value) override;
105 
106 public:
108  std::vector<PoseGraphNode> nodes_;
110  std::vector<PoseGraphEdge> edges_;
111 };
112 
113 } // namespace registration
114 } // namespace pipelines
115 } // namespace open3d
Edge of PoseGraph.
Definition: PoseGraph.h:41
bool uncertain_
Whether the edge is uncertain.
Definition: PoseGraph.h:83
PoseGraphEdge(int source_node_id=-1, int target_node_id=-1, const Eigen::Matrix4d &transformation=Eigen::Matrix4d::Identity(), const Eigen::Matrix6d &information=Eigen::Matrix6d::Identity(), bool uncertain=false, double confidence=1.0)
Parameterized Constructor.
Definition: PoseGraph.h:51
int source_node_id_
Source PoseGraphNode id.
Definition: PoseGraph.h:72
double confidence_
Confidence value of the edge.
Definition: PoseGraph.h:90
~PoseGraphEdge()
Definition: PoseGraph.cpp:54
Eigen::Matrix6d_u information_
Information matrix.
Definition: PoseGraph.h:78
bool ConvertFromJsonValue(const Json::Value &value) override
Definition: PoseGraph.cpp:78
Eigen::Matrix4d_u transformation_
Transformation matrix.
Definition: PoseGraph.h:76
int target_node_id_
Target PoseGraphNode id.
Definition: PoseGraph.h:74
bool ConvertToJsonValue(Json::Value &value) const override
Definition: PoseGraph.cpp:56
Data structure defining the pose graph.
Definition: PoseGraph.h:96
~PoseGraph() override
Definition: PoseGraph.cpp:109
PoseGraph()
Default Constructor.
Definition: PoseGraph.cpp:107
bool ConvertFromJsonValue(const Json::Value &value) override
Definition: PoseGraph.cpp:138
std::vector< PoseGraphNode > nodes_
List of PoseGraphNode.
Definition: PoseGraph.h:108
bool ConvertToJsonValue(Json::Value &value) const override
Definition: PoseGraph.cpp:111
std::vector< PoseGraphEdge > edges_
List of PoseGraphEdge.
Definition: PoseGraph.h:110
Node of PoseGraph.
Definition: PoseGraph.h:23
PoseGraphNode(const Eigen::Matrix4d &pose=Eigen::Matrix4d::Identity())
Default Constructor.
Definition: PoseGraph.h:26
~PoseGraphNode()
Definition: PoseGraph.cpp:18
bool ConvertFromJsonValue(const Json::Value &value) override
Definition: PoseGraph.cpp:33
bool ConvertToJsonValue(Json::Value &value) const override
Definition: PoseGraph.cpp:20
Eigen::Matrix4d_u pose_
Definition: PoseGraph.h:35
Definition: IJsonConvertible.h:40
Definition: PinholeCameraIntrinsic.cpp:16