Closed antithing closed 1 year ago
Calling vertices()
on your optimizer gives you an unordered_map<int, Vertex*> where the key is the ID. Based on the unordered_map you can query if an ID is already contained in the graph, e.g., by the count() method, see https://en.cppreference.com/w/cpp/container/unordered_map/count
thank you! That's perfect.
Hi, i am setting up a bundle adjustment problem using keyframes, 3d points and fiducial markers, and am fighting with the error:
g2o::OptimizableGraph::addVertex: FATAL, a vertex with ID has already been registered with this graph
Obviously i need to work on the logic behind assigning IDs, but i am wondering:
Is there a way to query if the vertex ID is used in the graph?