Open3D (C++ API)
PoseGraph.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 
29 #include <memory>
30 #include <vector>
31 
32 #include "Open3D/Utility/Eigen.h"
34 
35 namespace open3d {
36 namespace registration {
37 
39 public:
40  PoseGraphNode(const Eigen::Matrix4d &pose = Eigen::Matrix4d::Identity())
41  : pose_(pose) {}
43 
44 public:
45  bool ConvertToJsonValue(Json::Value &value) const override;
46  bool ConvertFromJsonValue(const Json::Value &value) override;
47 
48 public:
50 };
51 
53 public:
55  int source_node_id = -1,
56  int target_node_id = -1,
57  const Eigen::Matrix4d &transformation = Eigen::Matrix4d::Identity(),
58  const Eigen::Matrix6d &information = Eigen::Matrix6d::Identity(),
59  bool uncertain = false,
60  double confidence = 1.0)
61  : source_node_id_(source_node_id),
62  target_node_id_(target_node_id),
63  transformation_(transformation),
64  information_(information),
65  uncertain_(uncertain),
66  confidence_(confidence) {}
67  ~PoseGraphEdge();
68 
69 public:
70  bool ConvertToJsonValue(Json::Value &value) const override;
71  bool ConvertFromJsonValue(const Json::Value &value) override;
72 
73 public:
80  bool uncertain_;
85  double confidence_;
86 };
87 
89 public:
90  PoseGraph();
91  ~PoseGraph() override;
92 
93 public:
94  bool ConvertToJsonValue(Json::Value &value) const override;
95  bool ConvertFromJsonValue(const Json::Value &value) override;
96 
97 public:
98  std::vector<PoseGraphNode> nodes_;
99  std::vector<PoseGraphEdge> edges_;
100 };
101 
102 } // namespace registration
103 } // namespace open3d
bool ConvertToJsonValue(Json::Value &value) const override
Definition: PoseGraph.cpp:38
Eigen::Matrix6d_u information_
Definition: PoseGraph.h:77
std::vector< PoseGraphEdge > edges_
Definition: PoseGraph.h:99
double confidence_
Definition: PoseGraph.h:85
PoseGraphNode(const Eigen::Matrix4d &pose=Eigen::Matrix4d::Identity())
Definition: PoseGraph.h:40
Definition: PoseGraph.h:52
Eigen::Matrix4d_u pose_
Definition: PoseGraph.h:49
int source_node_id_
Definition: PoseGraph.h:74
~PoseGraphNode()
Definition: PoseGraph.cpp:36
int target_node_id_
Definition: PoseGraph.h:75
std::vector< PoseGraphNode > nodes_
Definition: PoseGraph.h:98
Definition: PoseGraph.h:88
bool uncertain_
Definition: PoseGraph.h:80
Definition: PinholeCameraIntrinsic.cpp:34
Definition: PoseGraph.h:38
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)
Definition: PoseGraph.h:54
Eigen::Matrix< double, 6, 6, Eigen::DontAlign > Matrix6d_u
Definition: Eigen.h:42
bool ConvertFromJsonValue(const Json::Value &value) override
Definition: PoseGraph.cpp:51
Eigen::Matrix< double, 4, 4, Eigen::DontAlign > Matrix4d_u
Definition: Eigen.h:43
Eigen::Matrix4d_u transformation_
Definition: PoseGraph.h:76
Definition: IJsonConvertible.h:42
Eigen::Matrix< double, 6, 6 > Matrix6d
Extending Eigen namespace by adding frequently used matrix type.
Definition: Eigen.h:37