spencer-project / spencer_people_tracking

Multi-modal ROS-based people detection and tracking framework for mobile robots developed within the context of the EU FP7 project SPENCER.
http://www.spencer.eu/
660 stars 327 forks source link

OpenCV 3.x suppport #45

Closed guchaojie closed 4 years ago

guchaojie commented 7 years ago

Hi everyone, I have ROS Kinetic on Ubuntu 16.04. As stated in the documentation, it is supported by OpenCV 3.1, while all the previous ROS versions are supported by OpenCV 2.4. There is any plan to support OpenCV 3.x for spencer_people_tracking.

JGMonroy commented 6 years ago

Hi there, I'm also facing the same problem as guchaojie, problems with OpenCV3.x when using these pkgs on Ubuntu 16.04 and ROS Kinetic. Any thoughts on moving to OpenCV3?

tlind commented 6 years ago

We are not planning to migrate the framework to OpenCV3, as some components (e.g. the laser detectors) heavily rely on the OpenCV 2 internal machine learningAPI.

However, it is possible to get it running on OpenCV3 without significant effort if you have installed OpenCV2 and OpenCV3 side-by-side. You essentially need to fork vision-opencv, rename e.g. the cv_bridge package to cv_bridge2, and then make the relevant SPENCER packages depend on cv_bridge2 instead of cv_bridge. Inside the CMakeLists.txt of the cv_bridge2 packages, use find_package(OpenCV 2) to enforce the old version of OpenCV being used.

bbrito commented 5 years ago

Another solution is to install Opencv2 by source:

http://mohsaad.com/2017/07/17/Installing-ROS-With-OpenCV/

tlind commented 4 years ago

Support for OpenCV 3 has been added in the "melodic" branch as part of commit 9cad8e6ba7. For this, you will have to switch to ROS Melodic (available under Ubuntu 18.04) or ROS Noetic (separate branch, Ubuntu 20.04).

For ROS Kinetic/Ubuntu 16.04, we will stay with OpenCV 2 as that distribution is nearing end-of-life.