gtsam  4.0.0
gtsam
InitializePose3.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
21 #pragma once
22 
23 #include <gtsam/geometry/Rot3.h>
24 #include <gtsam/inference/graph.h>
28 
29 namespace gtsam {
30 
31 typedef std::map<Key, std::vector<size_t> > KeyVectorMap;
32 typedef std::map<Key, Rot3> KeyRotMap;
33 
34 struct GTSAM_EXPORT InitializePose3 {
35  static GaussianFactorGraph buildLinearOrientationGraph(
36  const NonlinearFactorGraph& g);
37 
38  static Values normalizeRelaxedRotations(const VectorValues& relaxedRot3);
39 
43  static Values computeOrientationsChordal(
44  const NonlinearFactorGraph& pose3Graph);
45 
49  static Values computeOrientationsGradient(
50  const NonlinearFactorGraph& pose3Graph, const Values& givenGuess,
51  size_t maxIter = 10000, const bool setRefFrame = true);
52 
53  static void createSymbolicGraph(KeyVectorMap& adjEdgesMap,
54  KeyRotMap& factorId2RotMap,
55  const NonlinearFactorGraph& pose3Graph);
56 
57  static Vector3 gradientTron(const Rot3& R1, const Rot3& R2, const double a,
58  const double b);
59 
64  static NonlinearFactorGraph buildPose3graph(
65  const NonlinearFactorGraph& graph);
66 
67  static Values computePoses(NonlinearFactorGraph& pose3graph,
68  Values& initialRot);
69 
74  static Values initializeOrientations(const NonlinearFactorGraph& graph);
75 
81  static Values initialize(const NonlinearFactorGraph& graph,
82  const Values& givenGuess, bool useGradient = false);
83 
85  static Values initialize(const NonlinearFactorGraph& graph);
86 };
87 } // end of namespace gtsam
A non-templated config holding any types of Manifold-group elements.
Definition: Values.h:70
A Linear Factor Graph is a factor graph where all factors are Gaussian, i.e.
Definition: GaussianFactorGraph.h:65
Definition: Rot3.h:56
Factor Graph Constsiting of non-linear factors.
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:73
A non-linear factor graph is a graph of non-Gaussian, i.e.
Definition: NonlinearFactorGraph.h:77
3D rotation represented as a rotation matrix or quaternion
Graph algorithm using boost library.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
Definition: InitializePose3.h:34
Linear Factor Graph where all factors are Gaussians.
Factor Graph Values.