Understanding and Using dot graph

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding and Using dot graph

marsfan
Hello,

I recently found the ability in the database-viewer utility to generate a graphviz .dot file, but I cannot find much documentation on it. If I am correct, this is defining all links found between each image, but that still leaves me with a couple of questions.

1. What is the number on the second line for each node (always 0 or 1 for me)
2. What is the significance of the direction of the arrows? I sometimes have an arrow in each direction, and sometimes only in one direction.
3. Sometimes there is a L, C, Or M next to the arrows? What do these mean?
4. Sometime a number is highlighted, what does this mean?
4. I have tried to use this to identify locations that need to have manual links added, but when I select two images (each at the end of a line), that are visibly next to each other, and click the ADD button in the constraints view, I get the message: "Cannot find a transformation between nodes ### and ###". How can I fix this?
Reply | Threaded
Open this post in threaded view
|

Re: Understanding and Using dot graph

marsfan
I actually thought of one more question regarding the graph.

To generate a new graph after using the database-viewer to modify data, I have to close and re-open the database on my computer, which can take a while, as it is a 4.3GB database. Is there a faster way to do this?
Reply | Threaded
Open this post in threaded view
|

Re: Understanding and Using dot graph

matlabbe
Administrator
Hi,

I will refer to graph shown in this example: https://github.com/introlab/rtabmap/wiki/Cplusplus-Loop-Closure-Detection

1. It is the weight of the node, increased by rehearsal approach of rtabmap (when consecutive locations are similar, they are merged together).
2. Rehearsed nodes point to their parent, but parent won't point to their rehearsed nodes. The rehearsed nodes are not used anymore in the map. All other links would go in both direction.
3. M means Merged (rehearsed nodes as explained above). L means loop closure (parent), C means child of a loop closure. For example, if location 99 loops on location 12, there will be a link L from 99 to 12, and a link C from 12 to 99. Other links without label are neighbor links or odometry links (bidiectional).  
4. "a number is highlighted ..." not sure to see this. Can you add a screenshot?
5. See this comment: https://github.com/introlab/rtabmap/issues/497#issuecomment-582658327
6. Open the Graph View tab, it will show your changes directly without having to close/reopen the database. When a new constraint is added or removed, the graph is automatically re-optimized.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Understanding and Using dot graph

marsfan
Thanks for the detailed reply matlabbe. I unfortunately deleted the file with the highlighting. It may have been a glitch on my end. I will make a new forum post if it happens again.

Regarding the graph, I do not mean the graph view tab, but the graphviz dot file. I have to close and reload the database to generate the new dot file based on newly added loop closures.
Reply | Threaded
Open this post in threaded view
|

Re: Understanding and Using dot graph

matlabbe
Administrator
Oh I see. The dot graph is generated only from the links contained in the database. As the links are not pushed to database yet, they are not included. We would need to reimplement DBDriver::generateGraph() in DatabaseViewer by using all links (modified or not) from DatabaseViewer instead.

I opened an issue for this: https://github.com/introlab/rtabmap/issues/510

cheers,
Mathieu