descartes_light icon indicating copy to clipboard operation
descartes_light copied to clipboard

BGL: Search Information in Vertex Class

Open marip8 opened this issue 3 years ago • 0 comments

Currently the Vertex class (used for bundled properties in the BGL search methods) holds a subset of the information needed by the search methods (distance and color). Other properties, namely the vertex predecessor, is being managed outside the graph.

https://github.com/swri-robotics/descartes_light/blob/d56038bedba31d03a11dcf8f1e59bc0f927267c9/descartes_light/solvers/include/descartes_light/solvers/bgl/boost_graph_types.h#L36-L49

For clarity, it seems like the graph should either:

  1. manage all the vertex properties required for the search in the graph
    • Pros:
      • Bundled properties are somewhat easier to manage in the graphs
    • Cons:
      • Some fields of the Vertex class need to be populated by the solver build method and should be held constant during the search (sample and rung_idx), and other methods will be filled out by the search method (color, distance, etc.). This is somewhat confusing and prone to error
  2. all of those properties should be managed outside of the search.
    • Pros:
      • The Vertex class can be composed of only "read-only" members that get populated by the solver build method, which would reduce ambiguity about the class
    • Cons:
      • The containers for the vertex properties must be stored/maintained inside the solver class
      • The property containers would need to be passed to the graph serialization functions

marip8 avatar Sep 07 '21 21:09 marip8