leggedrobotics / darknet_ros

YOLO ROS: Real-Time Object Detection for ROS
BSD 3-Clause "New" or "Revised" License
2.14k stars 1.16k forks source link

OpenCV 4.x+ requires enabled C++11 support ROS2 Foxy #361

Closed blakermchale closed 2 years ago

blakermchale commented 2 years ago

Describe the bug When I build the foxy branch of darknet_ros with CUDA support I get the following errors:

/usr/include/opencv4/opencv2/core/cvdef.h:704:4: error: #error "OpenCV 4.x+ requires enabled C++11 support"
  704 | #  error "OpenCV 4.x+ requires enabled C++11 support"
      |    ^~~~~
/usr/include/opencv4/opencv2/core/cvdef.h:710:10: fatal error: array: No such file or directory
  710 | #include <array>

To Reproduce Steps to reproduce the behavior:

  1. Clone the foxy branch
  2. colcon build -DCMAKE_BUILD_TYPE=Release
  3. See error

Expected behavior I expect ROS2 Foxy to compile with CUDA support.

System (please complete the following information):

Additional context I noticed that this problem was fixed for Noetic in #308.

blakermchale commented 2 years ago

Just saw #257 and the discussion at the end that referenced this fork https://github.com/ajaypaul2008/darknet_ros/tree/foxy

Ar-Ray-code commented 2 years ago

Please try to use my fork :) .

blakermchale commented 2 years ago

Thanks! I switched to your branch on the PR you made and it works well!

Ar-Ray-code commented 2 years ago

Please close this.

blakermchale commented 2 years ago

Closed since #319 will fix this once it is merged.