ros-perception / image_transport_tutorials

ROS 2 tutorials for image_transport.
Apache License 2.0
50 stars 11 forks source link

Build Failure for ROS2 Humble #14

Closed s-m-asjad closed 6 months ago

s-m-asjad commented 6 months ago

Title is self-explanatory, the build fails for all lines with #include "cv_bridge/cv_bridge.hpp"

Screen Dump

--- stderr: image_transport_tutorials                             
~/ros2_ws/src/image_transport_tutorials/src/my_publisher.cpp:15:10: fatal error: cv_bridge/cv_bridge.hpp: No such file or directory
   15 | #include "cv_bridge/cv_bridge.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/my_publisher.dir/build.make:76: CMakeFiles/my_publisher.dir/src/my_publisher.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:598: CMakeFiles/my_publisher.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< image_transport_tutorials [4.72s, exited with code 2]

Summary: 0 packages finished [5.98s]
  1 package failed: image_transport_tutorials
  1 package had stderr output: image_transport_tutorials
s-m-asjad commented 6 months ago

cpp header needs to be changed to .h instead of .hpp in all .cpp files under the src folder. Please review similar issue here

Fixing issue with a new pull request. Until it is merged, please use the repository here for ROS2 Humble

clalancette commented 6 months ago

You need to use the humble branch when compiling for Humble, otherwise you run into the issue as you see.