RTAB MAP Need CUDA?

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

RTAB MAP Need CUDA?

GGYU
Hello I am ubuntu 22.04 users.


Does RTAB-Map vary depending on CUDA?


I wonder if the performance varies greatly depending on CUDA.

Reply | Threaded
Open this post in threaded view
|

Re: RTAB MAP Need CUDA?

matlabbe
Administrator
Depending on the algorithm, you can get a big boost using CUDA. See related parameters with suffix "Gpu":
rtabmap --params | grep -e Gpu -e GPU
Param: FAST/Gpu = "false"                                  [GPU-FAST: Use GPU version of FAST. This option is enabled only if OpenCV is built with CUDA and GPUs are detected.]
Param: FAST/GpuKeypointsRatio = "0.05"                     [Used with FAST GPU.]
Param: GFTT/Gpu = "false"                                  [GPU-GFTT: Use GPU version of GFTT. This option is enabled only if OpenCV>=3 is built with CUDA and GPUs are detected.]
Param: Kp/NNStrategy = "1"                                 [kNNFlannNaive=0, kNNFlannKdTree=1, kNNFlannLSH=2, kNNBruteForce=3, kNNBruteForceGPU=4]
Param: ORB/Gpu = "false"                                   [GPU-ORB: Use GPU version of ORB. This option is enabled only if OpenCV is built with CUDA and GPUs are detected.]
Param: SIFT/Gpu = "false"                                  [CudaSift: Use GPU version of SIFT. This option is enabled only if RTAB-Map is built with CudaSift dependency and GPUs are detected.]
Param: SURF/GpuKeypointsRatio = "0.01"                     [Used with SURF GPU.]
Param: SURF/GpuVersion = "false"                           [GPU-SURF: Use GPU version of SURF. This option is enabled only if OpenCV is built with CUDA and GPUs are detected.]
Param: Stereo/Gpu = "false"                                [[Stereo/OpticalFlow=true] Enable GPU version of the optical flow approach (only available if OpenCV is built with CUDA).]
Param: Vis/CorFlowGpu = "false"                            [[Vis/CorType=1] Enable GPU version of the optical flow approach (only available if OpenCV is built with CUDA).]
Param: Vis/CorNNType = "1"                                 [[Vis/CorType=0] kNNFlannNaive=0, kNNFlannKdTree=1, kNNFlannLSH=2, kNNBruteForce=3, kNNBruteForceGPU=4, BruteForceCrossCheck=5, SuperGlue=6, GMS=7. Used for features matching approach.]

In offline processing, the results should be fairly the same. Using GPU would be used if you need speed (e.g., higher VO frame rate) in online processing, which is particularly useful for robots running on Nvidia Jetson boards.
Reply | Threaded
Open this post in threaded view
|

Re: RTAB MAP Need CUDA?

GGYU
I can't find the file that contains this parameter. Which file includes this parameter?
Reply | Threaded
Open this post in threaded view
|

Re: RTAB MAP Need CUDA?

matlabbe
Administrator
Are you using ROS2 or the standalone version?

Standalone: you can launch with "rtabmap --GFTT/Gpu true" for example, it will set the corresponding parameter in the Preferences. You can also set it in the Preferences dialog.

ROS2: You can add them as parameters of the node. Make sure the value is string for all parameters shown by "rtabmap --params":
parameters=[{
          'GFTT/Gpu':'true',
          ...}]
Reply | Threaded
Open this post in threaded view
|

Re: RTAB MAP Need CUDA?

GGYU
I am using ROS2 Humble !!
Reply | Threaded
Open this post in threaded view
|

Re: RTAB MAP Need CUDA?

matlabbe
Administrator
For ROS2, you can set it as parameter of the node as shown in my previous post. Note that if you want to use Gpu optimizations, rtabmap (and consequently rtabmap_ros) should be rebuilt from source with OpenCV built with CUDA support.