Class GraphUtils

Class Documentation

class GraphUtils

Public Functions

inline GraphUtils()

Public Static Functions

static void copy_graph(const std::shared_ptr<GraphSLAM> &covisibility_graph, std::unique_ptr<GraphSLAM> &compressed_graph, const std::map<int, KeyFrame::Ptr> &keyframes)
Parameters:
  • covisibility_graph

  • compressed_graph

Returns:

* void

static void copy_graph_vertices(const std::shared_ptr<GraphSLAM> &covisibility_graph, const std::unique_ptr<GraphSLAM> &compressed_graph)
Parameters:
  • covisibility_graph

  • compressed_graph

static std::vector<g2o::VertexSE3*> copy_graph_edges(const std::shared_ptr<GraphSLAM> &covisibility_graph, const std::unique_ptr<GraphSLAM> &compressed_graph)
Parameters:
  • covisibility_graph

  • compressed_graph

Returns:

* std::vector<g2o::VertexSE3*>

static void copy_windowed_graph(const int window_size, const std::shared_ptr<GraphSLAM> &covisibility_graph, const std::unique_ptr<GraphSLAM> &compressed_graph, const std::map<int, KeyFrame::Ptr> &keyframes)
Parameters:
  • window_size

  • covisibility_graph

  • compressed_graph

  • keyframes

Returns:

* void

static int copy_keyframes_to_graph(const std::shared_ptr<GraphSLAM> &covisibility_graph, const std::unique_ptr<GraphSLAM> &compressed_graph, const std::map<int, KeyFrame::Ptr> &keyframe_window)
Parameters:
  • covisibility_graph

  • compressed_graph

  • keyframe_window

Returns:

* int min_keyframe_id

static std::vector<g2o::VertexSE3*> connect_keyframes(const std::shared_ptr<GraphSLAM> &covisibility_graph, const std::unique_ptr<GraphSLAM> &compressed_graph, const std::map<int, KeyFrame::Ptr> &complete_keyframe_window, bool &anchor_node_exists)
Parameters:
  • covisibility_graph

  • compressed_graph

  • complete_keyframe_window

Returns:

* std::vector<g2o::VertexSE3*>

static std::unordered_set<g2o::VertexSE3*> connect_keyframes_planes(const std::shared_ptr<GraphSLAM> &covisibility_graph, GraphSLAM *compressed_graph)
Parameters:
  • covisibility_graph

  • compressed_graph

Returns:

* std::unordered_set<g2o::VertexSE3*>

static void connect_broken_keyframes(std::vector<g2o::VertexSE3*> filtered_k_vec, const std::shared_ptr<GraphSLAM> &covisibility_graph, const std::unique_ptr<GraphSLAM> &compressed_graph, const std::map<int, KeyFrame::Ptr> &keyframes)
Parameters:
  • filtered_k_vec

  • covisibility_graph

  • compressed_graph

  • keyframes

Returns:

* void

static void fix_and_connect_keyframes(GraphSLAM *compressed_graph, const std::unordered_set<g2o::VertexSE3*> &fixed_keyframes_set)
Parameters:
  • compressed_graph

  • fixed_keyframes_set

static void connect_planes_rooms(const std::shared_ptr<GraphSLAM> &covisibility_graph, GraphSLAM *compressed_graph)
Parameters:
  • covisibility_graph

  • compressed_graph

Returns:

* void

static void connect_rooms_floors(const std::shared_ptr<GraphSLAM> &covisibility_graph, GraphSLAM *compressed_graph)
Parameters:
  • covisibility_graph

  • compressed_graph

Returns:

* void

static void update_graph(const std::unique_ptr<GraphSLAM> &compressed_graph, std::map<int, KeyFrame::Ptr> keyframes, std::unordered_map<int, VerticalPlanes> &x_vert_planes, std::unordered_map<int, VerticalPlanes> &y_vert_planes, std::unordered_map<int, Rooms> &rooms_vec, std::unordered_map<int, InfiniteRooms> &x_infinite_rooms, std::unordered_map<int, InfiniteRooms> &y_infinite_rooms, std::unordered_map<int, Floors> &floors_vec)
Parameters:
  • compressed_graph

  • keyframes

  • x_vert_planes

  • y_vert_planes

  • rooms_vec

  • x_infinite_rooms

  • y_infinite_rooms

  • floors_vec

static void set_marginalize_info(const std::shared_ptr<GraphSLAM> &local_graph, const std::shared_ptr<GraphSLAM> &covisibility_graph, const std::map<int, KeyFrame::Ptr> &room_keyframes)

Set the marginalize info object.

Parameters:
  • local_graph

  • covisibility_graph

  • room_keyframes

Returns:

* void

static bool get_keyframe_marg_data(g2o::VertexSE3 *vertex_se3)
Parameters:

vertex_se3

Returns:

true

Returns:

false