g2o
Toggle main menu visibility
Loading...
Searching...
No Matches
g2o
types
slam3d_addons
edge_se3_line.h
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
#ifndef G2O_EDGE_SE3_LINE_H_
28
#define G2O_EDGE_SE3_LINE_H_
29
30
#include "
g2o/core/base_binary_edge.h
"
31
#include "
g2o/types/slam3d/parameter_se3_offset.h
"
32
#include "
g2o/types/slam3d/vertex_se3.h
"
33
#include "
g2o_types_slam3d_addons_api.h
"
34
#include "
line3d.h
"
35
#include "
vertex_line3d.h
"
36
37
namespace
g2o
{
38
39
class
G2O_TYPES_SLAM3D_ADDONS_API
EdgeSE3Line3D
40
:
public
BaseBinaryEdge
<4, Line3D, VertexSE3, VertexLine3D> {
41
public
:
42
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
43
44
EdgeSE3Line3D
();
45
46
virtual
bool
read
(std::istream& is);
47
virtual
bool
write
(std::ostream& os)
const
;
48
49
void
computeError
();
50
51
virtual
void
setMeasurement
(
const
Vector6
& m) {
_measurement
= m; }
52
53
virtual
void
setMeasurement
(
const
Line3D
& m) {
_measurement
=
Line3D
(m); }
54
55
virtual
bool
setMeasurementData
(
const
double
* d) {
56
Eigen::Map<const Vector6> v(d);
57
_measurement
=
Line3D
(v);
58
return
true
;
59
}
60
61
virtual
bool
getMeasurementData
(
double
* d)
const
{
62
Eigen::Map<Vector6> v(d);
63
v =
_measurement
;
64
return
true
;
65
}
66
67
virtual
int
measurementDimension
()
const
{
return
6; }
68
69
Vector3
color
;
70
71
private
:
72
ParameterSE3Offset
*
offsetParam
;
73
CacheSE3Offset
*
cache
;
74
virtual
bool
resolveCaches
();
75
};
76
77
#ifdef G2O_HAVE_OPENGL
78
class
EdgeSE3Line3DDrawAction :
public
DrawAction
{
79
public
:
80
G2O_TYPES_SLAM3D_ADDONS_API
EdgeSE3Line3DDrawAction();
81
G2O_TYPES_SLAM3D_ADDONS_API
virtual
HyperGraphElementAction
* operator()(
82
HyperGraph::HyperGraphElement
* element,
83
HyperGraphElementAction::Parameters
* params_);
84
85
protected
:
86
virtual
bool
refreshPropertyPtrs(
87
HyperGraphElementAction::Parameters
* params_);
88
FloatProperty
*_lineLength, *_lineWidth;
89
};
90
#endif
91
92
}
// namespace g2o
93
#endif
base_binary_edge.h
g2o::BaseBinaryEdge< 4, Line3D, VertexSE3, VertexLine3D >::BaseBinaryEdge
BaseBinaryEdge()
Definition
base_binary_edge.h:41
g2o::BaseEdge< D, Line3D >::_measurement
Measurement _measurement
Definition
base_edge.h:146
g2o::CacheSE3Offset
caching the offset related to a vertex
Definition
parameter_se3_offset.h:67
g2o::DrawAction
draw actions
Definition
hyper_graph_action.h:201
g2o::EdgeSE3Line3D::computeError
void computeError()
Definition
edge_se3_line.cpp:55
g2o::EdgeSE3Line3D::EdgeSE3Line3D
EdgeSE3Line3D()
Definition
edge_se3_line.cpp:33
g2o::EdgeSE3Line3D::color
Vector3 color
Definition
edge_se3_line.h:69
g2o::EdgeSE3Line3D::resolveCaches
virtual bool resolveCaches()
Definition
edge_se3_line.cpp:64
g2o::EdgeSE3Line3D::setMeasurement
virtual void setMeasurement(const Line3D &m)
Definition
edge_se3_line.h:53
g2o::EdgeSE3Line3D::read
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
Definition
edge_se3_line.cpp:42
g2o::EdgeSE3Line3D::cache
CacheSE3Offset * cache
Definition
edge_se3_line.h:73
g2o::EdgeSE3Line3D::setMeasurementData
virtual bool setMeasurementData(const double *d)
Definition
edge_se3_line.h:55
g2o::EdgeSE3Line3D::setMeasurement
virtual void setMeasurement(const Vector6 &m)
Definition
edge_se3_line.h:51
g2o::EdgeSE3Line3D::getMeasurementData
virtual bool getMeasurementData(double *d) const
Definition
edge_se3_line.h:61
g2o::EdgeSE3Line3D::measurementDimension
virtual int measurementDimension() const
Definition
edge_se3_line.h:67
g2o::EdgeSE3Line3D::write
virtual bool write(std::ostream &os) const
write the vertex to a stream
Definition
edge_se3_line.cpp:49
g2o::EdgeSE3Line3D::EIGEN_MAKE_ALIGNED_OPERATOR_NEW
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Definition
edge_se3_line.h:42
g2o::EdgeSE3Line3D::offsetParam
ParameterSE3Offset * offsetParam
Definition
edge_se3_line.h:72
g2o::HyperGraphElementAction
Abstract action that operates on a graph entity.
Definition
hyper_graph_action.h:74
g2o::Line3D
Definition
line3d.h:53
g2o::ParameterSE3Offset
offset for an SE3
Definition
parameter_se3_offset.h:39
g2o_types_slam3d_addons_api.h
G2O_TYPES_SLAM3D_ADDONS_API
#define G2O_TYPES_SLAM3D_ADDONS_API
Definition
g2o_types_slam3d_addons_api.h:46
line3d.h
g2o
Definition
dl_wrapper.cpp:55
g2o::Vector3
VectorN< 3 > Vector3
Definition
eigen_types.h:51
g2o::Vector6
VectorN< 6 > Vector6
Definition
eigen_types.h:53
g2o::FloatProperty
Property< float > FloatProperty
Definition
property.h:150
parameter_se3_offset.h
g2o::HyperGraphElementAction::Parameters
Definition
hyper_graph_action.h:76
g2o::HyperGraph::HyperGraphElement
Definition
hyper_graph.h:80
vertex_line3d.h
vertex_se3.h
Generated on
for g2o by
1.17.0