Page d'accueil | Description du projet | Project Description (english) |
Let's assume that the environment is represented by the following
schematic:
So, we have, in memory, a map of the position of all the 21 doors.
Let's assume now that the robot is represented by a disc R, oriented toward the arrow. The red doors are the one visibles from this position of the robot.
Once the door position detected (in the robot frame), we get a local map, as illustrated below:
The problem is to identify the doors visible in the local map.
Using a correspondence graph provides a reliable solution to this identification problem. In such a graph, nodes are potential data associations (a node represent the association of "Door 1 -- Door IV"). Then we add an edge between two nodes of the graph if they are consistent with one another. For instance, the distance between Door 14 and Door 6 is the same as between Door I and door IV in the local map. Nodes (14,I) and (6,IV) are consistent, hence we add an edge between them.
Once the edges added to the graph, we look for a subset of nodes, with maximal size, such that all the nodes in this subset are consistent with each others. This subset is called a complete graph or a clique: all its nodes are connected to each others.
Problem: The search for a maximal subset of noded (or a maximal clique) is a NP-complete problem (i.e. very very hard to solve) in the general case. Nevertheless, if our consistency criterion is sufficiently discriminative, the resulting graph is sufficiently simple to allow for finding a maximal clique in a time compatible with a real-time implementation.
The objective of this library is to implement a graph representation and an algorithm that search for a maximal clique. This algorithm is inspired from the indications found on the web site: The Algorithm Design Manual.
Note: This algorithm is not at all memory efficient. So, when possible, it is recommended to make a pre-selection of potentially visible landmarks (Doors) knowing a initial guess of the robot position. This will reduce the size of the graph, and the amount of memory required to process it.
The search is done in two stages: First we search a maximal clique (i.e. local maximum), then we search if we can find a clique bigger. At each step, we reject any nodes whose degree is not compatible with being part of the maximum clique. The resulting algorithm is:
8 5 1 3 4 5 7 3 0 6 2 2 1 6 4 0 4 5 7 4 0 3 5 7 4 0 3 4 7 2 1 2 4 0 3 4 5The format is given below:
<Number of nodes> <Node 0> <Node 1> ... <Node n-1>Where each node is defined by a line such as:
<Number of neighbours> <adjacent 0> <adjacent 1> ...The graph we use here is:
Results | Comments |
---|---|
Printing #Vertices : 8 0 : 5 connection : 1 3 4 5 7 1 : 3 connection : 0 2 6 2 : 2 connection : 1 6 3 : 4 connection : 0 4 5 7 4 : 4 connection : 0 3 5 7 5 : 4 connection : 0 3 4 7 6 : 2 connection : 1 2 7 : 4 connection : 0 3 4 5 Converting . X . X X X . X X . X . . . X . . X . . . . X . X . . . X X . X X . . X . X . X X . . X X . . X . X X . . . . . X . . X X X . . Highest degree : 5 Maximal clique { 0 3 4 5 7 } Maximum clique { 0 3 4 5 7 } |
Graph display Display of the graph using an adjacency matrix Maximal degree : 5 --> Node 0 The search for a maximal clique gives immediatly THE maximum clique. |
Result visualisation
> tar zxf matchGraph.tgz > cd matchGraph > make > make test