ros / ros-overlay

Gentoo Overlay for ROS packages
33 stars 30 forks source link

Ros Lunar OpenCV and use of USE flags in overlay in general #98

Open archenroot opened 7 years ago

archenroot commented 7 years ago

I have Lunar finally on my laptop up and running :dancing_men:

I will be having here in Belgium next month my workstation from parents house back in Czech with 32 cores and I will be upgrading it to dual Xeon 22C, so 88 threads available, hope it will help as well the compilation times :-)))

But to the case. Comparing the Gentoo OpenCV and Lunar OpenCV it is big difference :-), especially when talking about USE flags and available OpenCV modules.

The Lunar OpenCV:

 OpenCV modules:
**--     To be built:                 core flann hdf imgproc ml photo reg surface_matching video viz freetype fuzzy imgcodecs shape videoio highgui objdetect plot superres xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib cvv datasets rgbd stereo videostab xfeatures2d ximgproc aruco optflow phase_unwrapping stitching structured_light java matlab python3
--     Disabled:                    world contrib_world
--     Disabled by dependency:      tracking
--     Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 ts cnn_3dobj sfm**

Gentoo OpenCV:

--   OpenCV modules:
--     To be built:                 cudev core cudaarithm flann hdf imgproc ml reg surface_matching video viz cudabgsegm cudafilters cudaimgproc cudawarping freetype fuzzy imgcodecs photo shape videoio cudacodec highgui objdetect plot xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo cvv datasets rgbd stereo superres videostab xfeatures2d ximgproc aruco optflow phase_unwrapping stitching structured_light
--     Disabled:                    world contrib_world dnn
--     Disabled by dependency:      tracking
--     Unavailable:                 java python2 python3 ts cnn_3dobj matlab sfm

So I enabled by hand following switches for CMake subsystem to get it working. This is just example of CUDA USE flags

# CUDA Stuff
                -DWITH_CUDA=ON
                -DWITH_CUBLAS=ON
                -DWITH_CUFFT=ON
                -DWITH_NVCUVID=ON
                -DCUDA_NPP_LIBRARY_ROOT_DIR=/opt/cuda
                -DCUDA_GENERATION="Maxwell"
                -DWITH_VTK=ON

Finally there quite huge set of USE flags to be available especially for OpenCV, I think this is nice example of extension, compatibility .

USE flags is minor question and we can extend generator to support them, but to me question is about how to handle situation with mutlti ROS distro installed and multi OpenCV versions pulled in, it must be clear from ebuild/eclass design perspective... I will prepare some expressions for this later....

allenh1 commented 7 years ago

Ok, that makes sense. I'm a little busy with other things at the moment, but this may be something for us to look at in the future.

In the meantime, I strongly encourage contributions to the ebuild-generator repo. You should have push access now, and it would be great to have these kinds of discussions there.

archenroot commented 7 years ago

Ok, I will be moving into that space now...

archenroot commented 7 years ago

Should i introduce this by patching existing ebuild, or rather the ebuild generator itself?

allenh1 commented 7 years ago

@archenroot I think patching the ebuild generator itself would be the best approach, if you don't mind!