Closed msha3421 closed 10 months ago
Can you hack "iron" into this conditional and let me know if it helps? https://github.com/berndpfrommer/ffmpeg_image_transport/blob/master/CMakeLists.txt#L16
Hold off. The API has changed again between humble and iron. I'm working on it.
Thanks for the quick response. I thought it was API issue too. I eventually made it work with iron with some dirty changes to the subscribeImpl() and advertiseImpl(). Given that the image_transport API changes from foxy/galactic, to humble, and now to rolling/iron, will you be considering creating different branches for these ROS distros?
Just thought about that and decided not to. I'll hack it with #defines and detecting ROS_DISTRO. Otherwise I'll have to backport any fixes or new features.
No problem. I will be happy to try out the code on iron once you push the fix.
Done. Would be great if you could test that it works (not just compiles)!
Hi @berndpfrommer, I just tested it and it builds and works on iron now. Thanks so much for the fix.
Hi, I am having an issue when compiling the code on ROS iron and Ubuntu 22.04. Can you advise what this issue can be related to? Thanks.
--- stderr: ffmpeg_image_transport::subscribeImpl(rclcpp::Node , const string&, const Callback&, rmw_qos_profile_t, rclcpp::SubscriptionOptions) [with M = ffmpeg_image_transportmsgs::msg::FFMPEGPacket<std::allocator >; std::string = std::cxx11::basic_string; image_transport::SubscriberPlugin::Callback = std::function<void(const std::shared_ptr<const sensormsgs::msg::Image<std::allocator > >&)>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::SubscriptionOptions = rclcpp::SubscriptionOptionsWithAllocator<std::allocator >]’
111 | void subscribeImpl(
| ^::advertiseImpl(rclcpp::Node , const string&, rmw_qos_profile_t, rclcpp::PublisherOptions) [with M = ffmpeg_image_transportmsgs::msg::FFMPEGPacket<std::allocator >; std::string = std:: cxx11::basic_string; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::PublisherOptions = rclcpp::PublisherOptionsWithAllocator<std::allocator >]’
101 | void advertiseImpl(
| ^
In file included from /root/ros_ws/src/ffmpeg_image_transport/src/ffmpeg_subscriber.cpp:16: /root/ros_ws/src/ffmpeg_image_transport/include/ffmpeg_image_transport/ffmpeg_subscriber.hpp:39:8: error: ‘void ffmpeg_image_transport::FFMPEGSubscriber::subscribeImpl(rclcpp::Node, const string&, const Callback&, rmw_qos_profile_t)’ marked ‘override’, but does not override 39 | void subscribeImpl( | ^
~~~~ /root/ros_ws/src/ffmpeg_image_transport/src/ffmpeg_subscriber.cpp: In member function ‘void ffmpeg_image_transport::FFMPEGSubscriber::subscribeImpl(rclcpp::Node, const string&, const Callback&, rmw_qos_profile_t)’: /root/ros_ws/src/ffmpeg_image_transport/src/ffmpeg_subscriber.cpp:47:40: error: no matching function for call to ‘ffmpeg_image_transport::FFMPEGSubscriber::subscribeImpl(rclcpp::Node&, const string&, const Callback&, rmw_qos_profile_t&)’ 47 | FFMPEGSubscriberPlugin::subscribeImpl(node, base_topic, callback, custom_qos); |~~~~~~~^~~~~~~~~~ In file included from /root/ros_ws/src/ffmpeg_image_transport/include/ffmpeg_image_transport/ffmpeg_subscriber.hpp:19, from /root/ros_ws/src/ffmpeg_image_transport/src/ffmpeg_subscriber.cpp:16: /opt/ros/iron/include/image_transport/image_transport/simple_subscriber_plugin.hpp:111:8: note: candidate: ‘void image_transport::SimpleSubscriberPlugin~~~~ /opt/ros/iron/include/image_transport/image_transport/simple_subscriber_plugin.hpp:111:8: note: candidate expects 5 arguments, 4 provided In file included from /root/ros_ws/src/ffmpeg_image_transport/src/ffmpeg_publisher.cpp:16: /root/ros_ws/src/ffmpeg_image_transport/include/ffmpeg_image_transport/ffmpeg_publisher.hpp:37:8: error: ‘void ffmpeg_image_transport::FFMPEGPublisher::advertiseImpl(rclcpp::Node, const string&, rmw_qos_profile_t)’ marked ‘override’, but does not override 37 | void advertiseImpl( | ^~~~~ /root/ros_ws/src/ffmpeg_image_transport/src/ffmpeg_publisher.cpp: In member function ‘void ffmpeg_image_transport::FFMPEGPublisher::advertiseImpl(rclcpp::Node, const string&, rmw_qos_profile_t)’: /root/ros_ws/src/ffmpeg_image_transport/src/ffmpeg_publisher.cpp:42:39: error: no matching function for call to ‘ffmpeg_image_transport::FFMPEGPublisher::advertiseImpl(rclcpp::Node&, const string&, rmw_qos_profile_t&)’ 42 | FFMPEGPublisherPlugin::advertiseImpl(node, base_topic, custom_qos); |~~~~~~~~^~~~~~~~~~ In file included from /root/ros_ws/src/ffmpeg_image_transport/include/ffmpeg_image_transport/ffmpeg_publisher.hpp:19, from /root/ros_ws/src/ffmpeg_image_transport/src/ffmpeg_publisher.cpp:16: /opt/ros/iron/include/image_transport/image_transport/simple_publisher_plugin.hpp:101:8: note: candidate: ‘void image_transport::SimplePublisherPlugin~~~~ /opt/ros/iron/include/image_transport/image_transport/simple_publisher_plugin.hpp:101:8: note: candidate expects 4 arguments, 3 provided In file included from /root/ros_ws/src/ffmpeg_image_transport/src/manifest.cpp:18: /root/ros_ws/src/ffmpeg_image_transport/include/ffmpeg_image_transport/ffmpeg_publisher.hpp:37:8: error: ‘void ffmpeg_image_transport::FFMPEGPublisher::advertiseImpl(rclcpp::Node, const string&, rmw_qos_profile_t)’ marked ‘override’, but does not override 37 | void advertiseImpl( | ^~~~~ In file included from /root/ros_ws/src/ffmpeg_image_transport/src/manifest.cpp:19: /root/ros_ws/src/ffmpeg_image_transport/include/ffmpeg_image_transport/ffmpeg_subscriber.hpp:39:8: error: ‘void ffmpeg_image_transport::FFMPEGSubscriber::subscribeImpl(rclcpp::Node, const string&, const Callback&, rmw_qos_profile_t)’ marked ‘override’, but does not override 39 | void subscribeImpl( | ^~~~~ gmake[2]: [CMakeFiles/ffmpeg_image_transport_component.dir/build.make:160: CMakeFiles/ffmpeg_image_transport_component.dir/src/manifest.cpp.o] Error 1 gmake[2]: Waiting for unfinished jobs.... gmake[2]: [CMakeFiles/ffmpeg_image_transport_component.dir/build.make:76: CMakeFiles/ffmpeg_image_transport_component.dir/src/ffmpeg_publisher.cpp.o] Error 1 gmake[2]: [CMakeFiles/ffmpeg_image_transport_component.dir/build.make:90: CMakeFiles/ffmpeg_image_transport_component.dir/src/ffmpeg_subscriber.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:139: CMakeFiles/ffmpeg_image_transport_component.dir/all] Error 2 gmake: [Makefile:146: all] Error 2Failed <<< ffmpeg_image_transport [4.13s, exited with code 2]