g2o
Public Member Functions | Public Attributes | Protected Attributes | List of all members
g2o::VertexTag Class Reference

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

#include <vertex_tag.h>

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

Public Member Functions

 VertexTag ()
 
 ~VertexTag ()
 
virtual bool write (std::ostream &os) const
 write the data to a stream More...
 
virtual bool read (std::istream &is)
 read the data from a stream More...
 
const std::string name () const
 
void setName (const std::string &name_)
 
const Vector3Fposition () 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 Datanext () const
 
Datanext ()
 
void setNext (Data *next_)
 
DataContainerdataContainer ()
 
const DataContainerdataContainer () const
 
void setDataContainer (DataContainer *dataContainer_)
 
- Public Member Functions inherited from g2o::HyperGraph::HyperGraphElement
virtual ~HyperGraphElement ()
 
HyperGraphElementclone () const
 

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 More...
 
double _loggerTimestamp
 timestamp when the measurement was recorded More...
 
std::string _tag
 string tag (FLASER, ROBOTLASER, ODOM..) of the line in the log More...
 
std::string _hostname
 name of the computer/robot generating the data More...
 
- 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 42 of file vertex_tag.h.

Constructor & Destructor Documentation

g2o::VertexTag::VertexTag ( )

Definition at line 42 of file vertex_tag.cpp.

42  : RobotData()
43  {
44  }
g2o::VertexTag::~VertexTag ( )

Definition at line 46 of file vertex_tag.cpp.

47  {
48  }

Member Function Documentation

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

Definition at line 52 of file vertex_tag.h.

Referenced by write().

52 { return _name;}
std::string _name
Definition: vertex_tag.h:57
const Vector3F& g2o::VertexTag::position ( ) const
inline

Definition at line 54 of file vertex_tag.h.

Referenced by write().

54 {return _position;}
Vector3F _position
Definition: vertex_tag.h:58
bool g2o::VertexTag::read ( std::istream &  is)
virtual

read the data from a stream

Implements g2o::HyperGraph::Data.

Definition at line 50 of file vertex_tag.cpp.

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

51  {
52  is >> _name;
53  is >> _position.x() >> _position.y() >> _position.z();
54  is >> _odom2d.x() >> _odom2d.y() >> _odom2d.z();
55  is >> _timestamp;
56  is >> _hostname;
57  is >> _loggerTimestamp;
58  return true;
59  }
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:60
double _loggerTimestamp
timestamp when the measurement was recorded
Definition: robot_data.h:61
Vector3F _position
Definition: vertex_tag.h:58
Vector3F _odom2d
Definition: vertex_tag.h:59
std::string _name
Definition: vertex_tag.h:57
void g2o::VertexTag::setName ( const std::string &  name_)
inline

Definition at line 53 of file vertex_tag.h.

53 {_name=name_;}
std::string _name
Definition: vertex_tag.h:57
void g2o::VertexTag::setPosition ( const Vector3F p)
inline

Definition at line 55 of file vertex_tag.h.

55 {_position = p;}
Vector3F _position
Definition: vertex_tag.h:58
bool g2o::VertexTag::write ( std::ostream &  os) const
virtual

write the data to a stream

Implements g2o::HyperGraph::Data.

Definition at line 61 of file vertex_tag.cpp.

References _name, _odom2d, _position, g2o::opengl::drawBox(), g2o::RobotData::hostname(), g2o::RobotData::loggerTimestamp(), name(), position(), g2o::DrawAction::refreshPropertyPtrs(), and g2o::RobotData::timestamp().

62  {
63  os << _name << " ";
64  os << FIXED(_position.x() << " " << _position.y() << " " << _position.z() << " ");
65  os << FIXED(_odom2d.x() << " " << _odom2d.y() << " " << _odom2d.z() << " ");
66  os << FIXED(" " << timestamp() << " " << hostname() << " " << loggerTimestamp());
67  return os.good();
68  }
double timestamp() const
Definition: robot_data.h:47
Vector3F _position
Definition: vertex_tag.h:58
double loggerTimestamp() const
Definition: robot_data.h:50
Vector3F _odom2d
Definition: vertex_tag.h:59
std::string _name
Definition: vertex_tag.h:57
const std::string & hostname() const
Definition: robot_data.h:56

Member Data Documentation

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

Definition at line 57 of file vertex_tag.h.

Referenced by read(), and write().

Vector3F g2o::VertexTag::_odom2d
protected

Definition at line 59 of file vertex_tag.h.

Referenced by read(), and write().

Vector3F g2o::VertexTag::_position
protected

Definition at line 58 of file vertex_tag.h.

Referenced by read(), and write().

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: