Enable SURF- GPU version in ROS launch file

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

Enable SURF- GPU version in ROS launch file

dizeng
Hey Mathieu,

I noticed there are a parameter in rtabmap GUI that can be enabled to use SURF-GPU.
How can I do this in the launch file?
Reply | Threaded
Open this post in threaded view
|

Re: Enable SURF- GPU version in ROS launch file

matlabbe
Administrator
Hi,

Here is a tip to know which parameters correspond to those in Preferences dialog. You can mouse over the parameter's widget:


In a launch file:
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap">
   <param name="SURF/GpuVersion" type="string" value="true"/>
</node>
Note that in the screenshot above, the checkbox is disabled, which means that rtabmap is not built with OpenCV built with CUDA and nonfree modules at the same time.

Another way to get SURF parameters:
$ rosrun rtabmap_ros rtabmap --params | grep SURF
Param: Kp/DetectorStrategy = "0"                           [0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB.]
Param: SURF/Extended = "false"                             [Extended descriptor flag (true - use extended 128-element descriptors; false - use 64-element descriptors).]
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: SURF/HessianThreshold = "500"                       [Threshold for hessian keypoint detector used in SURF.]
Param: SURF/OctaveLayers = "2"                             [Number of octave layers within each octave.]
Param: SURF/Octaves = "4"                                  [Number of pyramid octaves the keypoint detector will use.]
Param: SURF/Upright = "false"                              [Up-right or rotated features flag (true - do not compute orientation of features; false - compute orientation).]
Param: Vis/FeatureType = "6"                               [0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB.]

cheers