Ask Your Question

ROS2 Windows OpenCV self package?

asked 2019-03-18 03:35:04 -0500

Obeseturtle gravatar image


I have finished migrating a ROS package to ROS2 and I am currently going to test it on Windows.

I had a question regarding the installation of OpenCV.

Is there a particular reason why OpenCV is precompiled instead of using the OpenCV versions available in chocolate repository?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-03-18 12:34:19 -0500

nuclearsandwich gravatar image

My memory is hazy, and I don't have a Windows machine to verify handy at the moment. But I believe the binary releases from upstream and chocolatey were compiled for Python 2 rather than Python 3, which is needed for ROS 2.

From the OpenCV chocolatey package description:

This package installs precompiled OpenCV binaries. This does not allow you to customize the features compiled into your installation. This download is about 193 MB. If you wish to customize the features compiled in your installation, then you must compile OpenCV yourself.

I didn't see anything in the description of the chocolatey package which hints at the target python interpreter for current releases. If they've switched to Python 3, we may be able to deprecate our custom binary distribution in favor of the chocolatey package.

edit flag offensive delete link more


Thank you for your response. I see, it is clear to me now again thank you.

Obeseturtle gravatar image Obeseturtle  ( 2019-03-18 19:05:02 -0500 )edit

answered 2019-03-18 19:15:34 -0500

marguedas gravatar image

IIRC the Python bindings are not used by ROS 2 (though it could change in the near future. At the time we weren't able to use the Chocolatey packages, not sure if they were non-existent or not built with VS2017. Another motivation for building a custom version was also to have (for internal testing) and to ship (to users) the debug libraries.

As it looks like the Chocolatey packages came a long way in the last couple years, it may be worth reconsidering the chocolatey packages (and checking if they're built with Python 3 bindings for future-proofness). Though the debug libraries will likely not be included so users building in Debug would need to either build their own or ROS 2 releases could keep shipping a custom built archive.

edit flag offensive delete link more


Oh thank you for expanding on the reason for the prebuilt binaries. I appreciate that.
For now I will just use the OpenCV provided.

Obeseturtle gravatar image Obeseturtle  ( 2019-03-18 19:29:50 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-03-18 03:35:04 -0500

Seen: 302 times

Last updated: Mar 18 '19