g2o
Loading...
Searching...
No Matches
g2o::VertexTag Class Reference

string tag to be attached to a vertex More...

#include <vertex_tag.h>

Inheritance diagram for g2o::VertexTag:
Collaboration diagram for g2o::VertexTag:

Public Member Functions

 VertexTag ()
 ~VertexTag ()
virtual bool write (std::ostream &os) const
 write the data to a stream
virtual bool read (std::istream &is)
 read the data from a stream
const std::string name () const
void setName (const std::string &name_)
const Vector3F & position () const
void setPosition (const Vector3F &p)
Public Member Functions inherited from g2o::RobotData
 RobotData ()
virtual ~RobotData ()
double timestamp () const
void setTimestamp (double ts)
double loggerTimestamp () const
void setLoggerTimestamp (double ts)
const std::string & tag () const
void setTag (const std::string &tag)
const std::string & hostname () const
void setHostname (const std::string &hostname)
Public Member Functions inherited from g2o::HyperGraph::Data
 Data ()
 ~Data ()
virtual HyperGraph::HyperGraphElementType elementType () const
const Data * next () const
Data * next ()
void setNext (Data *next_)
DataContainer * dataContainer ()
const DataContainer * dataContainer () const
void setDataContainer (DataContainer *dataContainer_)
Public Member Functions inherited from g2o::HyperGraph::HyperGraphElement
virtual ~HyperGraphElement ()

Public Attributes

 EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Protected Attributes

std::string _name
Vector3F _position
Vector3F _odom2d
Protected Attributes inherited from g2o::RobotData
double _timestamp
 timestamp when the measurement was generated
double _loggerTimestamp
 timestamp when the measurement was recorded
std::string _tag
 string tag (FLASER, ROBOTLASER, ODOM..) of the line in the log
std::string _hostname
 name of the computer/robot generating the data
Protected Attributes inherited from g2o::HyperGraph::Data
Data * _next
DataContainer * _dataContainer

Detailed Description

string tag to be attached to a vertex

A laser measurement obtained by a robot. The measurement is equipped with a pose of the robot at which the measurement was taken. The read/write function correspond to the CARMEN logfile format.

Definition at line 43 of file vertex_tag.h.

Constructor & Destructor Documentation

◆ VertexTag()

g2o::VertexTag::VertexTag ( )

Definition at line 42 of file vertex_tag.cpp.

42: RobotData() {}

References g2o::RobotData::RobotData().

◆ ~VertexTag()

g2o::VertexTag::~VertexTag ( )

Definition at line 44 of file vertex_tag.cpp.

44{}

Member Function Documentation

◆ name()

const std::string g2o::VertexTag::name ( ) const
inline

Definition at line 52 of file vertex_tag.h.

52{ return _name; }
std::string _name
Definition vertex_tag.h:58

References _name.

◆ position()

const Vector3F & g2o::VertexTag::position ( ) const
inline

Definition at line 54 of file vertex_tag.h.

54{ return _position; }
Vector3F _position
Definition vertex_tag.h:59

References _position.

◆ read()

bool g2o::VertexTag::read ( std::istream & is)
virtual

read the data from a stream

Implements g2o::HyperGraph::Data.

Definition at line 46 of file vertex_tag.cpp.

46 {
47 is >> _name;
48 is >> _position.x() >> _position.y() >> _position.z();
49 is >> _odom2d.x() >> _odom2d.y() >> _odom2d.z();
50 is >> _timestamp;
51 is >> _hostname;
52 is >> _loggerTimestamp;
53 return true;
54}
double _loggerTimestamp
timestamp when the measurement was recorded
Definition robot_data.h:60
std::string _hostname
name of the computer/robot generating the data
Definition robot_data.h:63
double _timestamp
timestamp when the measurement was generated
Definition robot_data.h:59
Vector3F _odom2d
Definition vertex_tag.h:60

References g2o::RobotData::_hostname, g2o::RobotData::_loggerTimestamp, _name, _odom2d, _position, and g2o::RobotData::_timestamp.

◆ setName()

void g2o::VertexTag::setName ( const std::string & name_)
inline

Definition at line 53 of file vertex_tag.h.

53{ _name = name_; }

References _name.

◆ setPosition()

void g2o::VertexTag::setPosition ( const Vector3F & p)
inline

Definition at line 55 of file vertex_tag.h.

55{ _position = p; }

References _position.

◆ write()

bool g2o::VertexTag::write ( std::ostream & os) const
virtual

write the data to a stream

Implements g2o::HyperGraph::Data.

Definition at line 56 of file vertex_tag.cpp.

56 {
57 os << _name << " ";
58 os << FIXED(_position.x()
59 << " " << _position.y() << " " << _position.z() << " ");
60 os << FIXED(_odom2d.x() << " " << _odom2d.y() << " " << _odom2d.z() << " ");
61 os << FIXED(" " << timestamp() << " " << hostname() << " "
62 << loggerTimestamp());
63 return os.good();
64}
double timestamp() const
Definition robot_data.h:46
double loggerTimestamp() const
Definition robot_data.h:49
const std::string & hostname() const
Definition robot_data.h:55

References _name, _odom2d, _position, g2o::RobotData::hostname(), g2o::RobotData::loggerTimestamp(), and g2o::RobotData::timestamp().

Member Data Documentation

◆ _name

std::string g2o::VertexTag::_name
protected

Definition at line 58 of file vertex_tag.h.

Referenced by name(), read(), setName(), and write().

◆ _odom2d

Vector3F g2o::VertexTag::_odom2d
protected

Definition at line 60 of file vertex_tag.h.

Referenced by read(), and write().

◆ _position

Vector3F g2o::VertexTag::_position
protected

Definition at line 59 of file vertex_tag.h.

Referenced by position(), read(), setPosition(), and write().

◆ EIGEN_MAKE_ALIGNED_OPERATOR_NEW

g2o::VertexTag::EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Definition at line 45 of file vertex_tag.h.


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