Class GraphFileLoader

Inheritance Relationships

Derived Type

Class Documentation

class GraphFileLoader

A plugin interface to parse a file into the graph.

Subclassed by nav2_route::GeoJsonGraphFileLoader

Public Types

using Ptr = std::shared_ptr<GraphFileLoader>

Public Functions

GraphFileLoader() = default

Constructor.

virtual ~GraphFileLoader() = default

Virtual destructor.

virtual void configure(const rclcpp_lifecycle::LifecycleNode::SharedPtr node) = 0

Configure the graph file loader, but do not store the node.

Parameters:

parent – pointer to user’s node

virtual bool loadGraphFromFile(Graph &graph, GraphToIDMap &graph_to_id_map, std::string filepath) = 0

Method to load the graph from the filepath.

Parameters:
  • graph – The graph to populate

  • filepath – The file to parse

  • idx_map – A map translating nodeid’s to graph idxs for use in graph modification services and idx-based route planning requests. This is much faster than using a map the full graph data structure.

Returns:

true if graph was successfully loaded