|
| | PlannerClass (int direction, const PlannerConfig &planner_config) |
| | Constructor for PlannerClass.
|
| |
| State | randomState (const PlannerConfig &planner_config) |
| | Generate a random state by sampling from within the bounds of the terrain.
|
| |
| std::vector< int > | neighborhoodN (State s, int N) const |
| | Get the closest N vertices to the specified state by Euclidean distance.
|
| |
| std::vector< int > | neighborhoodDist (State q, double dist) const |
| | Get the vertices within the specified Euclidean distance of the specified state.
|
| |
| int | getNearestNeighbor (State q) const |
| | Get the closest verticex to the specified state by Euclidean distance.
|
| |
| | GraphClass () |
| | Constructor for GraphClass.
|
| |
| void | addVertex (int index, State s) |
| | Add a new vertex to the graph along with its state data.
|
| |
| State | getVertex (int index) |
| | Retrieve the state stored at a particular index in the graph.
|
| |
| int | getNumVertices () |
| | Retrieve the total number of vertices in the graph, computed as the size of the vertices vector.
|
| |
| virtual void | addEdge (int idx1, int idx2) |
| | Add a new edge to the graph.
|
| |
| virtual void | addEdge (int idx1, int idx2, double edge_cost) |
| | Add a new edge to the graph.
|
| |
| void | removeEdge (int idx1, int idx2) |
| | Remove an edge of the graph.
|
| |
| virtual int | getPredecessor (int idx) |
| | Get the parent of a vertex.
|
| |
| std::vector< int > | getSuccessors (int idx) |
| | Get the children of a vertex.
|
| |
| void | addAction (int idx, Action a) |
| | Add an action to a particular vertex. This is the action that lead to this particular vertex from its parent.
|
| |
| Action | getAction (int idx) |
| | Get the action of a vertex.
|
| |
| void | updateGValue (int idx, double val) |
| | Update the g-value of a vertex and propogate to all its successors.
|
| |
| double | getGValue (int idx) |
| | Get the g-value of a vertex.
|
| |
| double | computeEdgeCost (int idx1, int idx2) |
| | Compute the cost of an edge between two vertices.
|
| |
| void | printVertex (State s) |
| | Print the state information via stdout.
|
| |
|
void | printVertices () |
| | Print the all vertices in the graph via stdout.
|
| |
| void | printIncomingEdges (int idx) |
| | Print the edges leading to a vertex via stdout.
|
| |
|
virtual void | printEdges () |
| | Print the all edges in the graph via stdout.
|
| |
| virtual void | init (State s) |
| | Initialize the graph by adding the root vertex (idx = 0) and setting g(idx) = 0.
|
| |
|
|
std::unordered_map< int, State > | vertices |
| | Map from vertex indices to corresponding states.
|
| |
|
std::unordered_map< int, Action > | actions |
| | Map from vertex indices to the actions leading to those vertices.
|
| |
|
std::unordered_map< int, std::vector< int > > | edges |
| | Map from vertex indices to their parent(s)
|
| |
|
std::unordered_map< int, std::vector< int > > | successors |
| | Map from vertex indices to their children.
|
| |
|
std::unordered_map< int, double > | g_values |
| | Map from vertex indices to their costs (g-values)
|
| |
A directed graph class with supplemental methods to aid in sample-based planning.
This class inherits GraphClass, and adds method to add random states to the graph and search for neighbors. These functions are useful for sample-based planners such as RRTs or PRMs.