-
Notifications
You must be signed in to change notification settings - Fork 1.1k
File Format
The g2o command line tool and the g2o_viewer are able to load an optimization problem from a human readable text file. Each line in the file stores a vertex, an edge, a data packet, or additional information.
Each line starts with a tag which specifies which kind of information is stored in this line. If the line starts with a '#', the line is regarded as comment.
Vertex information follows the following syntax:
TAG ID CURRENT_ESTIMATE
Here, the TAG corresponds to the name under which the vertex class is known to the factory constructing the elements.
The (hyper-)edges or constraints are given in the following format:
TAG ID_SET MEASUREMENT INFORMATION_MATRIX
Here, the TAG corresponds to the name under which the edge class is known to the factory constructing the elements. The ID_SET is a list of vertex IDs which specifies to which vertices the edge is connected.
The information matrix or precision matrix which represent the uncertainty of the measurement error is the inverse of the covariance matrix. Hence, it is symmetric and positive semi-definite. We typically only store the upper-triangular block of the matrix in row-major order. For example, if the information matrix \( \mathbf{\Omega} \) is a \( 3 \times 3 \) matrix with the following elements
\[\left(]
the serialization would be \( q_{11} \; q_{12} \; q_{13} \; q_{22} \; q_{23} \; q_{33} \). For a compact documentation we employ the following helper function.
\[\mathrm{info}(x,y,\vartheta)]
Currently, the following types of additional information is supported by g2o.
FIX ID_SET
Allows to specify that the given set of vertices is fixed and its values are not changed by the optimization algorithms.