descartes_light
descartes_light copied to clipboard
BGL: Search Information in Vertex Class
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:
- 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 solverbuild
method and should be held constant during the search (sample
andrung_idx
), and other methods will be filled out by thesearch
method (color
,distance
, etc.). This is somewhat confusing and prone to error
- Some fields of the
- Pros:
- 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 solverbuild
method, which would reduce ambiguity about the class
- The
- 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
- Pros: