Open lvgeng opened 5 years ago
it is a little bit late but here is the answer to your question.
The input ‘pose’ to the function add_vertex should be a g2o.Isometry3d object which you can instantiate in one of the following ways:
g2o.Isometry3d( a 4x4 np.ndarray transformation matrix )
g2o.Isometry3d( a 3x3 np.ndarray rotation matrix, a 3x1 np.ndarray translation matrix )
I think there are 2 more constructors for Isometry3d but these should be enough.
https://github.com/uoip/g2opy#pose-graph-optimization gives an example of optimizer. However, how to use the functions defined is confusing. For instance, the function
And the same issue for set_vertex() in add_edge(). These functions are just hard to understand, and the C++ documents does not have functions with same names.