graphslam.util module
Utility functions used throughout the package.
- graphslam.util.neg_pi_to_pi(angle)[source]
Normalize
angle
to be in \([-\pi, \pi)\).- Parameters:
angle (float) – An angle (in radians)
- Returns:
The angle normalized to \([-\pi, \pi)\)
- Return type:
float
- graphslam.util.solve_for_edge_dimensionality(n)[source]
Solve for the dimensionality of an edge.
In a .g2o file, an edge is specified as
<estimate> <information matrix>
, where only the upper triangular portion of the matrix is provided.This solves the problem:
\[d + \frac{d (d + 1)}{2} = n\]- Returns:
The dimensionality of the edge
- Return type:
int