Threads in RTAB-Map

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

Threads in RTAB-Map

yanmingz
Hi Mathieu,

Could you give me some introductions about how many thread are used in your program and what their functions are?

I give out a list threads in your program (standalone, non-ros, not UI related, for stereo slam) based on my reading:

a. rtabmapthread: the main thread of the algorithm
b. camerathread: to capture images
c. odometrythread: for visual odometry
d. PreUpdateThread: to update the word dictionary
e. CompressionThread (ctImage ctDepth ctLaserScan ctUserData) to compress sensor data
f. DBReader: to process database

And there are UCvMat2QImageThread threads. But I think they are used for UI only.

Do I lost anything? Or is there something wrong in the list? Thanks a lot

Best regards
Yanming
Reply | Threaded
Open this post in threaded view
|

Re: Threads in RTAB-Map

matlabbe
Administrator
Hi,

The count is good! The three main threads (without the GUI thread) that are always running are (a), (b or f), and (c).

More info:
d. PreUpdateThread is an optional thread used when creating a signature. The dictionary is updated at the same time we extract features (e.g., SURF) from the new image. When the features are extracted and the dictionary is updated, we can do the quantization of the extracted features to the dictionary to create visual words for the new image.
e. CompressionThread is used to compress all data in parallel (instead of one after the other) when creating a signature.
f. DBReader is like a CameraThread for database input, but it can also publish OdometryEvent.
g. UCvMat2QImageThread is used only in the GUI to convert at the same time RGB and depth images to show in Qt.

cheers
Reply | Threaded
Open this post in threaded view
|

Re: Threads in RTAB-Map

Asimarif11
how do i reach till there ? :D  i goto the github link to your souce code and i cant figure out anything .
any help ? :)
Reply | Threaded
Open this post in threaded view
|

Re: Threads in RTAB-Map

matlabbe
Administrator
In reply to this post by matlabbe
EDIT: Forgot to mention the thread used to empty the DBDriver's trash. Main loop here and started from here.

For the new people trying to figure out where is the RTAB-Map's main processing loop, see the rtabmap::process(...) method.

cheers