g2o
Loading...
Searching...
No Matches
Public Member Functions | List of all members
g2o::EdgeSE3WriteGnuplotAction Class Reference

Output the pose-pose constraint to Gnuplot data file. More...

#include <edge_se3.h>

Inheritance diagram for g2o::EdgeSE3WriteGnuplotAction:
Inheritance graph
[legend]
Collaboration diagram for g2o::EdgeSE3WriteGnuplotAction:
Collaboration graph
[legend]

Public Member Functions

 EdgeSE3WriteGnuplotAction ()
 
virtual HyperGraphElementActionoperator() (HyperGraph::HyperGraphElement *element, HyperGraphElementAction::Parameters *params_)
 
- Public Member Functions inherited from g2o::WriteGnuplotAction
 WriteGnuplotAction (const std::string &typeName_)
 
- Public Member Functions inherited from g2o::HyperGraphElementAction
 HyperGraphElementAction (const std::string &typeName_="")
 
virtual HyperGraphElementActionoperator() (const HyperGraph::HyperGraphElement *element, Parameters *parameters)
 
virtual ~HyperGraphElementAction ()
 
const std::string & typeName () const
 returns the typeid name of the action
 
const std::string & name () const
 returns the name of an action, e.g "draw"
 
void setTypeName (const std::string &typeName_)
 sets the type on which an action has to operate
 

Additional Inherited Members

- Public Types inherited from g2o::HyperGraphElementAction
typedef std::shared_ptr< HyperGraphElementActionHyperGraphElementActionPtr
 
typedef std::map< std::string, HyperGraphElementActionPtrActionMap
 
- Protected Attributes inherited from g2o::HyperGraphElementAction
std::string _typeName
 
std::string _name
 

Detailed Description

Output the pose-pose constraint to Gnuplot data file.

Definition at line 92 of file edge_se3.h.

Constructor & Destructor Documentation

◆ EdgeSE3WriteGnuplotAction()

g2o::EdgeSE3WriteGnuplotAction::EdgeSE3WriteGnuplotAction ( )

Definition at line 101 of file edge_se3.cpp.

102 : WriteGnuplotAction(typeid(EdgeSE3).name()) {}
const std::string & name() const
returns the name of an action, e.g "draw"
WriteGnuplotAction(const std::string &typeName_)

Member Function Documentation

◆ operator()()

HyperGraphElementAction * g2o::EdgeSE3WriteGnuplotAction::operator() ( HyperGraph::HyperGraphElement element,
HyperGraphElementAction::Parameters parameters 
)
virtual

redefine this to do the action stuff. If successful, the action returns a pointer to itself

Reimplemented from g2o::HyperGraphElementAction.

Definition at line 104 of file edge_se3.cpp.

106 {
107 if (typeid(*element).name() != _typeName) return nullptr;
108 WriteGnuplotAction::Parameters* params =
109 static_cast<WriteGnuplotAction::Parameters*>(params_);
110 if (!params->os) {
111 return nullptr;
112 }
113
114 EdgeSE3* e = static_cast<EdgeSE3*>(element);
115 VertexSE3* fromEdge = static_cast<VertexSE3*>(e->vertices()[0]);
116 VertexSE3* toEdge = static_cast<VertexSE3*>(e->vertices()[1]);
117 Vector6 fromV, toV;
118 fromV = internal::toVectorMQT(fromEdge->estimate());
119 toV = internal::toVectorMQT(toEdge->estimate());
120 for (int i = 0; i < 6; i++) {
121 *(params->os) << fromV[i] << " ";
122 }
123 for (int i = 0; i < 6; i++) {
124 *(params->os) << toV[i] << " ";
125 }
126 *(params->os) << std::endl;
127 return this;
128}
Vector6 toVectorMQT(const Isometry3 &t)
VectorN< 6 > Vector6
Definition eigen_types.h:53

References g2o::HyperGraphElementAction::_typeName, g2o::BaseVertex< D, T >::estimate(), g2o::WriteGnuplotAction::Parameters::os, g2o::internal::toVectorMQT(), and g2o::HyperGraph::Edge::vertices().


The documentation for this class was generated from the following files: