g2o
Toggle main menu visibility
Loading...
Searching...
No Matches
g2o
types
slam2d_addons
edge_line2d.cpp
Go to the documentation of this file.
1
// g2o - General Graph Optimization
2
// Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
3
// All rights reserved.
4
//
5
// Redistribution and use in source and binary forms, with or without
6
// modification, are permitted provided that the following conditions are
7
// met:
8
//
9
// * Redistributions of source code must retain the above copyright notice,
10
// this list of conditions and the following disclaimer.
11
// * Redistributions in binary form must reproduce the above copyright
12
// notice, this list of conditions and the following disclaimer in the
13
// documentation and/or other materials provided with the distribution.
14
//
15
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
16
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17
// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
18
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27
#include "
edge_line2d.h
"
28
29
#ifdef G2O_HAVE_OPENGL
30
#include "
g2o/stuff/opengl_primitives.h
"
31
#include "
g2o/stuff/opengl_wrapper.h
"
32
#endif
33
34
using namespace
g2o
;
35
using namespace
Eigen
;
36
37
EdgeLine2D::EdgeLine2D
()
38
:
BaseBinaryEdge
<2,
Line2D
,
VertexLine2D
,
VertexLine2D
>() {
39
_information
.setIdentity();
40
_error
.setZero();
41
}
42
43
bool
EdgeLine2D::read
(std::istream& is) {
44
internal::readVector
(is,
_measurement
);
45
return
readInformationMatrix
(is);
46
}
47
48
bool
EdgeLine2D::write
(std::ostream& os)
const
{
49
internal::writeVector
(os,
measurement
());
50
return
writeInformationMatrix
(os);
51
}
52
53
#ifndef NUMERIC_JACOBIAN_TWO_D_TYPES
54
void
EdgeLine2D::linearizeOplus
() {
55
_jacobianOplusXi
= -Matrix2::Identity();
56
_jacobianOplusXj
= Matrix2::Identity();
57
}
58
#endif
g2o::BaseBinaryEdge< 2, Line2D, VertexLine2D, VertexLine2D >::_jacobianOplusXj
BaseFixedSizedEdge< D, Line2D, VertexLine2D, VertexLine2D >::template JacobianType< D, VertexLine2D::Dimension > & _jacobianOplusXj
Definition
base_binary_edge.h:48
g2o::BaseBinaryEdge< 2, Line2D, VertexLine2D, VertexLine2D >::BaseBinaryEdge
BaseBinaryEdge()
Definition
base_binary_edge.h:41
g2o::BaseBinaryEdge< 2, Line2D, VertexLine2D, VertexLine2D >::_jacobianOplusXi
BaseFixedSizedEdge< D, Line2D, VertexLine2D, VertexLine2D >::template JacobianType< D, VertexLine2D::Dimension > & _jacobianOplusXi
Definition
base_binary_edge.h:45
g2o::BaseEdge< D, Line2D >::writeInformationMatrix
bool writeInformationMatrix(std::ostream &os) const
Definition
base_edge.h:165
g2o::BaseEdge< D, Line2D >::readInformationMatrix
bool readInformationMatrix(std::istream &is)
Definition
base_edge.h:173
g2o::BaseEdge< D, Line2D >::measurement
EIGEN_STRONG_INLINE const Measurement & measurement() const
Definition
base_edge.h:119
g2o::BaseEdge< D, Line2D >::_information
InformationType _information
Definition
base_edge.h:147
g2o::BaseEdge< D, Line2D >::_measurement
Measurement _measurement
Definition
base_edge.h:146
g2o::BaseEdge< D, Line2D >::_error
ErrorVector _error
Definition
base_edge.h:149
g2o::EdgeLine2D::write
virtual bool write(std::ostream &os) const
write the vertex to a stream
Definition
edge_line2d.cpp:48
g2o::EdgeLine2D::linearizeOplus
virtual void linearizeOplus()
Definition
edge_line2d.cpp:54
g2o::EdgeLine2D::EdgeLine2D
EIGEN_MAKE_ALIGNED_OPERATOR_NEW EdgeLine2D()
Definition
edge_line2d.cpp:37
g2o::EdgeLine2D::read
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
Definition
edge_line2d.cpp:43
g2o::VertexLine2D
Definition
vertex_line2d.h:40
edge_line2d.h
Eigen
Definition
jet.h:938
g2o::internal::writeVector
bool writeVector(std::ostream &os, const Eigen::DenseBase< Derived > &b)
Definition
io_helper.h:36
g2o::internal::readVector
bool readVector(std::istream &is, Eigen::DenseBase< Derived > &b)
Definition
io_helper.h:42
g2o
Definition
dl_wrapper.cpp:55
opengl_primitives.h
opengl_wrapper.h
g2o::Line2D
Definition
line_2d.h:38
Generated on
for g2o by
1.17.0