ros-perception / image_pipeline

An image processing pipeline for ROS.
Other
801 stars 729 forks source link

ERROR Building in Humble: error: ‘struct rclcpp::PublisherEventCallbacks’ has no member named ‘matched_callback’ #949

Closed PlayWeird closed 8 months ago

PlayWeird commented 9 months ago

I'm trying to build your image_pipeline from source but keep getting this error. Any help would be appreciated. I'm currently using ROS2 Humble and have cloned the humble branch.

Starting >>> tracetools_image_pipeline
Starting >>> camera_calibration
Starting >>> depth_image_proc
Starting >>> image_publisher
Starting >>> image_rotate                                                                           
Starting >>> image_view
Finished <<< tracetools_image_pipeline [0.66s]                                                              
Starting >>> image_proc
Finished <<< image_publisher [0.98s]                                                                 
Finished <<< image_view [1.05s]                                                                      
--- stderr: camera_calibration                                                                       
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
---
Finished <<< camera_calibration [1.37s]
--- stderr: image_proc                                                                                   
/home/gaetano/image_pipeline/src/image_pipeline/image_proc/src/rectify.cpp: In constructor ‘image_proc::RectifyNode::RectifyNode(const rclcpp::NodeOptions&)’:
/home/gaetano/image_pipeline/src/image_pipeline/image_proc/src/rectify.cpp:68:31: error: ‘struct rclcpp::PublisherEventCallbacks’ has no member named ‘matched_callback’
   68 |   pub_options.event_callbacks.matched_callback =
      |                               ^~~~~~~~~~~~~~~~
/home/gaetano/image_pipeline/src/image_pipeline/image_proc/src/rectify.cpp:69:12: error: ‘rclcpp::MatchedInfo’ has not been declared
   69 |     [this](rclcpp::MatchedInfo &)
      |            ^~~~~~
/home/gaetano/image_pipeline/src/image_pipeline/image_proc/src/rectify.cpp:89:48: error: too many arguments to function ‘image_transport::Publisher image_transport::create_publisher(rclcpp::Node*, const string&, rmw_qos_profile_t)’
   89 |   pub_rect_ = image_transport::create_publisher(this, "image_rect", qos_profile, pub_options);
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/gaetano/image_pipeline/src/image_pipeline/image_proc/include/image_proc/rectify.hpp:41,
                 from /home/gaetano/image_pipeline/src/image_pipeline/image_proc/src/rectify.cpp:40:
/opt/ros/humble/include/image_transport/image_transport/image_transport.hpp:53:11: note: declared here
   53 | Publisher create_publisher(
      |           ^~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/rectify.dir/build.make:76: CMakeFiles/rectify.dir/src/rectify.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:209: CMakeFiles/rectify.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< image_proc [3.81s, exited with code 2]
Aborted  <<< image_rotate [5.97s]                                                                               
Aborted  <<< depth_image_proc [8.61s]                               

Summary: 4 packages finished [9.20s]
  1 package failed: image_proc
  2 packages aborted: depth_image_proc image_rotate
  4 packages had stderr output: camera_calibration depth_image_proc image_proc image_rotate
  2 packages not processed
samuel-ongzx commented 9 months ago

Could you double check if you are on the humble branch? The default cloned branch is rolling so you might be on humble. I am able to compile fine on the latest commit based of humble.

The rolling branch has the line that throws you the error but it is not part of the humble branch.

mikeferguson commented 8 months ago

@samuel-ongzx is correct here - you need to use the correct branch - humble branch is passing CI so there should be no issue once you switch to that.

PlayWeird commented 8 months ago

I checked and you were correct. My issue was that I was switching to the humble branch on the GitHub page thinking that the HTTPS link was also switching to that branch. Thanks.