next up previous contents index
Next: Optimizing a trajectory Up: Motion planning Previous: Expanding a graph

Searching a graph

Once a graph has been created, we need a function that can search it to see if two nodes are connected : the function int p3d_graph_search(p3d_graph *graph,double (*fct_heurist)(),int (*fct_valid)(),int (*fct_end)())   that runs a A* algorithm. This function checks if the nodes graph->search_start and graph->search_goal are connected in the graph (cf Annex gif), with the function fct_heurist being the heuristic for the search (usually the function double p3d_heurist(p3d_node *n1, p3d_node *n2, p3d_graph *G)), the function fct_valid being a checking function (usually the function int p3d_valid(p3d_edge *E, p3d_graph *G)) and the function fct_end being the termination criterion function (usually the function int p3d_end(p3d_node *n1, p3d_node *n2)).

The list of edges connecting graph->search_start and graph->search_goal allows the user to build the trajectory connecting the two configuration with the sequence of valid local paths corresponding to those edges, using the functions p3d_beg_traj, p3d_add_desc_courbe, p3d_end_traj and the current local method.



Nicola Simeon
Fri Oct 27 09:07:38 MET DST 2000