8000 readImageSequence method elicits build complaints in catkin (opencv versioning issue) · Issue #267 · wavelab/libwave · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

  • Pricing
  • Sign up

    readImageSequence method elicits build complaints in catkin (opencv versioning issue) #267

    Closed

    Description

    @navganti

    Occurs when trying to build wave_vision (either through CMake or Catkin) and 2 instances of OpenCV are installed. The two instances are the custom one downloaded through my libwave installation, and the other is the OpenCV packaged with ROS.

    Full error message, copied from an issue in another project:

    Errors << libwave:make /home/buu/catkin_ws/logs/libwave/build.make.000.log
    /home/buu/catkin_ws/src/autonomoose/rospackages/autonomoose_deps/libwave/wave_vision/src/utils.cpp: In function ‘std::vectorcv::Mat wave::readImageSequence(const string&)’:
    /home/buu/catkin_ws/src/autonomoose/rospackages/autonomoose_deps/libwave/wave_vision/src/utils.cpp:104:41: error: ‘CAP_IMAGES’ is not a member of ‘cv’
    cv::VideoCapture sequence(img_path, cv::CAP_IMAGES);
    ^
    /home/buu/catkin_ws/src/autonomoose/rospackages/autonomoose_deps/libwave/wave_vision/src/utils.cpp:106:37: error: ‘CAP_PROP_FRAME_COUNT’ is not a member of ‘cv’
    num_images = (int) sequence.get(cv::CAP_PROP_FRAME_COUNT);
    ^
    make[2]: *** [wave_vision/CMakeFiles/wave_vision.dir/src/utils.cpp.o] Error 1
    make[1]: *** [wave_vision/CMakeFiles/wave_vision.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make: *** [all] Error 2
    cd /home/buu/catkin_ws/build/libwave; catkin build --get-env libwave | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -

    Activity

    1. self-assigned this
      on Jan 9, 2018
    2. navganti commented on Jan 9, 2018

      @navganti
      ContributorAuthor

      Okay so @leokoppel. Regarding this, we're having issues in numerous places - as you recommended to me like a month ago, I only got it working once I removed my custom installation of OpenCV. Due to ROS's ties with OpenCV in a bunch of places I figured it was best to not go near that.

    3. navganti commented on Jan 9, 2018

      @navganti
      ContributorAuthor

      @leokoppel I don't really know how we should deal with this. Obviously we don't want this to be dependent on ROS, but installing OpenCV from source causes issues if you've already got it.

      Perhaps we should add the OpenCV installation as optional? Like the user can decide whether or not to install it from us from a prompt, or through a flag?

    4. navganti commented on Jan 10, 2018

      @navganti
      ContributorAuthor

      OR @leokoppel we can check if opencv is already installed on the system. If so, don't install...

    5. leokoppel commented on Jan 13, 2018

      @leokoppel
      Contributor

      We should install to /opt/wavelab for any automated install. This will prevent our install from conflicting with other packages, e.g. OpenCV packaged with ROS.

      The error 'CAP_IMAGES’ is not a member of ‘cv’ is a special case when opencv2 is installed in /usr, not by ROS. For this special case I don't know any workaround.

      As I wrote elsewhere:

      This issue is observed when opencv2 is installed in /usr/include/opencv2. One way to resolve it is to uninstall opencv2.

      It seems OpenCV does things like #include "opencv2/core/mat.hpp" and I don't know a way to preempt /usr/include/opencv2/core/mat.hpp being found first, over the one in /opt/ros. Surely there must be a way to have opencv2 and 3 installed at the same time?

    6. navganti commented on Apr 5, 2018

      @navganti
      ContributorAuthor

      @leokoppel I'm going to close this issue - I don't think we really have any permament workaround for right now.

      I deleted opencv2 from my machine and just used the ROS installation with no issues. I do think the best way to get around this would be to check if the user already has opencv installed (with ROS), and if so don't install..

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0