Class VertexTimeDiff

Inheritance Relationships

Base Type

  • public g2o::BaseVertex< 1, double >

Class Documentation

class VertexTimeDiff : public g2o::BaseVertex<1, double>

This class stores and wraps a time difference \( \Delta T \) into a vertex that can be optimized via g2o.

Public Functions

inline explicit VertexTimeDiff(bool fixed = false)

Default constructor.

Parameters:

fixed – if true, this vertex is considered fixed during optimization [default: false]

inline explicit VertexTimeDiff(double dt, bool fixed = false)

Construct the TimeDiff vertex with a value.

Parameters:
  • dt – time difference value of the vertex

  • fixed – if true, this vertex is considered fixed during optimization [default: false]

~VertexTimeDiff() override = default

Destructs the VertexTimeDiff.

inline double &dt()

Access the timediff value of the vertex.

See also

estimate

Returns:

reference to dt

inline const double &dt() const

Access the timediff value of the vertex (read-only)

See also

estimate

Returns:

const reference to dt

inline void setToOriginImpl() override

Set the underlying TimeDiff estimate \( \Delta T \) to default.

inline void oplusImpl(const double *update) override

Define the update increment \( \Delta T_{k+1} = \Delta T_k + update \). A simple addition implements what we want.

Parameters:

update – increment that should be added to the previous esimate

inline bool read(std::istream &is) override

Read an estimate of \( \Delta T \) from an input stream.

Parameters:

is – input stream

Returns:

always true

inline bool write(std::ostream &os) const override

Write the estimate \( \Delta T \) to an output stream.

Parameters:

os – output stream

Returns:

true if the export was successful, otherwise false