SpaSolver.h
Go to the documentation of this file.
1 /*
2  * Copyright 2010 SRI International
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef KARTO_SPASOLVER_H
19 #define KARTO_SPASOLVER_H
20 
21 #include "OpenKarto/OpenMapper.h"
22 
23 #ifndef EIGEN_USE_NEW_STDVECTOR
24 #define EIGEN_USE_NEW_STDVECTOR
25 #endif // EIGEN_USE_NEW_STDVECTOR
26 
27 #define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat(10)
28 
29 #include <Eigen/Eigen>
30 #include <ros/time.h>
31 
32 #include <nav2d_karto/spa2d.h>
33 
34 typedef std::vector<karto::Matrix3> CovarianceVector;
35 
37 {
38 public:
39  SpaSolver();
40  virtual ~SpaSolver();
41 
42 public:
43  virtual void Clear();
44  virtual void Compute();
45  virtual const karto::ScanSolver::IdPoseVector& GetCorrections() const;
46 
49 
50  // Get the underlying graph from SBA
51  // return the graph of constraints
53  void getGraph(std::vector<float> &g) { m_Spa.getGraph(g); }
54  void reCompute();
55 
56 private:
58 
60 
62 };
63 
64 #endif // KARTO_SPASOLVER_H
65 
virtual const karto::ScanSolver::IdPoseVector & GetCorrections() const
Definition: SpaSolver.cpp:38
virtual void AddConstraint(karto::Edge< karto::LocalizedObjectPtr > *pEdge)
Definition: SpaSolver.cpp:74
void reCompute()
Definition: SpaSolver.cpp:60
void getGraph(std::vector< float > &g)
x,y -> x&#39;,y&#39; 4 floats per connection
Definition: SpaSolver.h:53
SysSPA2d m_Spa
Definition: SpaSolver.h:59
SysSPA2d holds a set of nodes and constraints for sparse pose adjustment.
Definition: spa2d.h:187
std::vector< karto::Matrix3 > CovarianceVector
Definition: SpaSolver.h:34
virtual void Clear()
Definition: SpaSolver.cpp:33
karto::ScanSolver::IdPoseVector corrections
Definition: SpaSolver.h:57
virtual void Compute()
Definition: SpaSolver.cpp:43
virtual void AddNode(karto::Vertex< karto::LocalizedObjectPtr > *pVertex)
Definition: SpaSolver.cpp:67
virtual ~SpaSolver()
Definition: SpaSolver.cpp:28
ros::Time mLastSPA
Definition: SpaSolver.h:61
void getGraph(std::vector< float > &graph)
Definition: spa2d.cpp:993


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:36