vision_opencv icon indicating copy to clipboard operation
vision_opencv copied to clipboard

compile against opencv 4 custom version

Open keivanzavari opened this issue 5 years ago • 0 comments

I am trying to compile cv_bridge on Ubuntu 18.04 with ros-melodic where I also have opencv 4.4.0 installed. The installed python version is 3.6. I tried both melodic and noetic branches. Here are my findings:

  • melodic branch compilation fails because it assumes that the installed version of opencv is 3. I tried changing it to opencv 4 but that doesn't compile either.
  • neotic branch also doesn't compile, but is easier to fix. I guess there is an assumption that the python version is 3.7. When finding python libs there is this comparison that if the installed python version is less than 3.8, it tries to find python 3.7. I changed this line to
find_package(Boost REQUIRED python3)

and that seems to work.

Now my question is, would there be a problem to simply look for any python 3 version?

I also just see this PR which is open now for more than 2 years.

keivanzavari avatar Jan 12 '21 15:01 keivanzavari