graphslam.g2o_parameters module

Classes for storing parameters from .g2o files.

class graphslam.g2o_parameters.BaseG2OParameter(key, value)[source]

Bases: ABC

A base class for representing parameters from .g2o files.

Parameters:
  • key – A key that will be used to lookup this parameter in a dictionary

  • value – This parameter’s value

key

A key that will be used to lookup this parameter in a dictionary

value

This parameter’s value

_abc_impl = <_abc._abc_data object>
abstract classmethod from_g2o(line)[source]

Load a parameter from a line in a .g2o file.

Parameters:

line (str) – The line from the .g2o file

Returns:

The instantiated parameter object, or None if line does not correspond to this parameter type

Return type:

BaseG2OParameter, None

abstract to_g2o()[source]

Export the parameter to the .g2o format.

Returns:

The parameter in .g2o format

Return type:

str, None

class graphslam.g2o_parameters.G2OParameterSE2Offset(key, value)[source]

Bases: BaseG2OParameter

A class for storing a g2o \(SE(2)\) offset parameter.

key

A tuple of the form ("PARAMS_SE2OFFSET", id)

Type:

tuple[str, int]

value

The offset

Type:

graphslam.pose.se2.PoseSE2

_abc_impl = <_abc._abc_data object>
classmethod from_g2o(line)[source]

Load an \(SE(2)\) offset parameter from a line in a .g2o file.

Parameters:

line (str) – The line from the .g2o file

Returns:

The instantiated parameter object, or None if line does not correspond to an \(SE(2)\) offset parameter

Return type:

G2OParameterSE2Offset, None

to_g2o()[source]

Export the \(SE(2)\) offset parameter to the .g2o format.

Returns:

The parameter in .g2o format

Return type:

str

class graphslam.g2o_parameters.G2OParameterSE3Offset(key, value)[source]

Bases: BaseG2OParameter

A class for storing a g2o \(SE(3)\) offset parameter.

key

A tuple of the form ("PARAMS_SE3OFFSET", id)

Type:

tuple[str, int]

value

The offset

Type:

graphslam.pose.se3.PoseSE3

_abc_impl = <_abc._abc_data object>
classmethod from_g2o(line)[source]

Load an \(SE(3)\) offset parameter from a line in a .g2o file.

Parameters:

line (str) – The line from the .g2o file

Returns:

The instantiated parameter object, or None if line does not correspond to an \(SE(3)\) offset parameter

Return type:

G2OParameterSE3Offset, None

to_g2o()[source]

Export the \(SE(3)\) offset parameter to the .g2o format.

Returns:

The parameter in .g2o format

Return type:

str