ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

ROS1 + OpenCV

ldconfig -p | grep opencv -i shows that I have OpenCV 3.2 (and ROS Melodic on Ubuntu 18.04)

ldd <system_install_prefix>/ | grep gtk shows that OpenCV was not compiled against Qt.

Is OpenCV3 bundled with ROS (I remember it was distributed separately)? If no (which I assume is the case), are there any plans to do so in the future?

I’m asking because of issue#201 of image_pipeline and @roehling’s comment. Using image_saver is not fun anymore :sweat_smile: Also, is anyone aware of what OpenCV community’s response is wrt their handling of GTK?

In Melodic, we decided go with OpenCV 3.2. Since that is available from the system on Ubuntu 18.04, we didn’t have to build it ourselves and we just use the system version.

Not unless there is a very compelling reason to do so. In past releases when ROS bundled OpenCV itself, it led to a lot of problems and a lot of churn. Thus, we are going to try to stick with the system version of OpenCV for Melodic to avoid these problems.

It’s probably worth reaching out to the OpenCV and/or GTK community to see what the current situation, since the original bug in GTK seems to have been fixed 3 years ago. There is clearly something else going on. Unfortunately I don’t personally have much knowledge of either of those communities (or of the software).

Barring that, it may be worthwhile to go with the workaround you described in the above bug.

Hope that helps.

Yeah, as @roehling found out, the issue is the cv::startWindowThread. Hopefully, this issue is resolved in the next sync.

And no need for bundling OpenCV for such a trivial issue. However, if cv::startWindowThread is used in other parts of ROS, it might be beneficial to switch away from that for the foreseeable future.