BrettRD / ros-gst-bridge

a bidirectional ros to gstreamer bridge and utilities for dynamic pipelines
Other
128 stars 30 forks source link

Error when build the gst_bridge: ‘Executor’ in namespace ‘rclcpp’ does not name a type #38

Closed XingkaiEden closed 2 years ago

XingkaiEden commented 2 years ago

Hi,

I am trying to feed jpeg sequence images to a GStreamer pipeline and I found this awesome package. But I have a hard time building this package on my machine.

Environment: Ubuntu 18, arm processor, ros2-dashing

Issues description: I followed the building instruction in README. And when I try to run colon build, it returns an error for gst_bridge.

Starting >>> gst_bridge
--- stderr: gst_bridge                             
In file included from /home/ubuntu/remote-ws/src/ros-gst-bridge/gst_bridge/include/gst_bridge/rosaudiosink.h:25:0,
                 from /home/ubuntu/remote-ws/src/ros-gst-bridge/gst_bridge/src/rosgstbridgeplugin.cpp:24:
/home/ubuntu/remote-ws/src/ros-gst-bridge/gst_bridge/include/gst_bridge/rosbasesink.h:48:11: error: ‘Executor’ in namespace ‘rclcpp’ does not name a type
   rclcpp::Executor::SharedPtr ros_executor;
           ^~~~~~~~
In file included from /home/ubuntu/remote-ws/src/ros-gst-bridge/gst_bridge/include/gst_bridge/rosaudiosrc.h:25:0,
                 from /home/ubuntu/remote-ws/src/ros-gst-bridge/gst_bridge/src/rosgstbridgeplugin.cpp:27:
/home/ubuntu/remote-ws/src/ros-gst-bridge/gst_bridge/include/gst_bridge/rosbasesrc.h:48:11: error: ‘Executor’ in namespace ‘rclcpp’ does not name a type
   rclcpp::Executor::SharedPtr ros_executor;
           ^~~~~~~~
make[2]: *** [CMakeFiles/rosgstbridge.dir/src/rosgstbridgeplugin.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/rosgstbridge.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< gst_bridge [2.30s, exited with code 2]
BrettRD commented 2 years ago

This is an API change in Galactic that was back-ported as far as Foxy. This change is known to break support for Dashing, which is marked End of Life.

If you really need to support Dashing, you can try reverting just commit number 819f6b6dd7936af5b7c6aa76487f229dd7cdf4fe. This should revert the executor API back to something compatible with Dashing / Foxy.

XingkaiEden commented 2 years ago

Thank you! The commit bd9b63d works on my machine with Dashing :)