include
nav2d_karto
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
36
class
SpaSolver
:
public
karto::ScanSolver
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
47
virtual
void
AddNode
(
karto::Vertex<karto::LocalizedObjectPtr>
* pVertex);
48
virtual
void
AddConstraint
(
karto::Edge<karto::LocalizedObjectPtr>
* pEdge);
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
:
57
karto::ScanSolver::IdPoseVector
corrections
;
58
59
SysSPA2d
m_Spa
;
60
61
ros::Time
mLastSPA
;
62
};
63
64
#endif // KARTO_SPASOLVER_H
65
SpaSolver::AddNode
virtual void AddNode(karto::Vertex< karto::LocalizedObjectPtr > *pVertex)
Definition:
SpaSolver.cpp:67
karto::ScanSolver
Definition:
OpenMapper.h:738
SpaSolver::GetCorrections
virtual const karto::ScanSolver::IdPoseVector & GetCorrections() const
Definition:
SpaSolver.cpp:38
SpaSolver::mLastSPA
ros::Time mLastSPA
Definition:
SpaSolver.h:61
SysSPA2d::getGraph
void getGraph(std::vector< float > &graph)
Definition:
spa2d.cpp:993
CovarianceVector
std::vector< karto::Matrix3 > CovarianceVector
Definition:
SpaSolver.h:34
time.h
SpaSolver::getGraph
void getGraph(std::vector< float > &g)
x,y -> x',y' 4 floats per connection
Definition:
SpaSolver.h:53
SpaSolver::Compute
virtual void Compute()
Definition:
SpaSolver.cpp:43
SpaSolver::Clear
virtual void Clear()
Definition:
SpaSolver.cpp:33
OpenMapper.h
karto::List
Definition:
List.h:49
SpaSolver::SpaSolver
SpaSolver()
Definition:
SpaSolver.cpp:22
SpaSolver::corrections
karto::ScanSolver::IdPoseVector corrections
Definition:
SpaSolver.h:57
SpaSolver::reCompute
void reCompute()
Definition:
SpaSolver.cpp:60
SpaSolver::m_Spa
SysSPA2d m_Spa
Definition:
SpaSolver.h:59
ros::Time
SpaSolver
Definition:
SpaSolver.h:36
karto::Vertex
Definition:
OpenMapper.h:217
SpaSolver::~SpaSolver
virtual ~SpaSolver()
Definition:
SpaSolver.cpp:28
spa2d.h
SysSPA2d
SysSPA2d holds a set of nodes and constraints for sparse pose adjustment.
Definition:
spa2d.h:183
SpaSolver::AddConstraint
virtual void AddConstraint(karto::Edge< karto::LocalizedObjectPtr > *pEdge)
Definition:
SpaSolver.cpp:74
karto::Edge
Definition:
OpenMapper.h:211
nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Wed Mar 2 2022 00:37:22