Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented action bridge #256

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open

Implemented action bridge #256

wants to merge 43 commits into from

Conversation

hsd-dev
Copy link
Contributor

@hsd-dev hsd-dev commented May 5, 2020

This is in continuation of the work we started last year (https://discourse.ros.org/t/introducing-action-bridge/9103). The PR maps the available actions on the path and generates the interface mappings. There's also an action_bridge.cpp which accepts the name and type of the action and creates an action bridge.

NOTE:

  • The PR is for eloquent because I am having issues compiling the master branch (even without the action_bridge). Any help here welcome.
  • I am having issues compiling the interface factory for GripperCommand, because the name of the action and the message within it is the same. It generates 2 files with identical function names (first defined here).
control_msgs__msg__GripperCommand__factories.cpp
control_msgs__action__GripperCommand__factories.cpp
  • builtin_interfaces seems to be ignored in case of services. I am not sure if this is the best solution
if (ros1_type, ros2_type) not in message_string_pairs and not ros2_type.startswith("builtin_interfaces"):
  • TODO: write tests, update code formatter in editor
  • missing feature: auto-discovery

@hidmic hidmic added the enhancement New feature or request label May 7, 2020
@hidmic
Copy link
Contributor

hidmic commented May 7, 2020

The PR is for eloquent because I am having issues compiling the master branch (even without the action_bridge). Any help here welcome.

What kind of issues? Feature PRs against the stable eloquent branch are not likely to get merged.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented May 8, 2020

This is the build log for master branch

Mapping for package example_interfaces contains unknown field(s)
Mapping for package example_interfaces contains unknown field(s)
/home/hsd/tmp/bridge_ws/src/ros1_bridge/test/test_ros2_client.cpp: In function ‘int main(int, char**)’:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/test/test_ros2_client.cpp:37:13: error: ‘rclcpp::FutureReturnCode’ has not been declared
     rclcpp::FutureReturnCode::SUCCESS)
             ^~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/test_ros2_client_cpp.dir/test/test_ros2_client.cpp.o] Error 1
make[1]: *** [CMakeFiles/test_ros2_client_cpp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /home/hsd/tmp/bridge_ws/src/ros1_bridge/build/ros1_bridge/generated/get_factory.cpp:3:0:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:193:19: error: ‘MessageInfo’ in namespace ‘rclcpp’ does not name a type
     const rclcpp::MessageInfo & msg_info,
                   ^~~~~~~~~~~
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp: In member function ‘rclcpp::SubscriptionBase::SharedPtr ros1_bridge::Factory<ROS1_T, ROS2_T>::create_ros2_subscriber(rclcpp::Node::SharedPtr, const string&, const rmw_qos_profile_t&, ros::Publisher, rclcpp::PublisherBase::SharedPtr)’:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:120:64: error: ‘MessageInfo’ in namespace ‘rclcpp’ does not name a type
       void(const typename ROS2_T::SharedPtr msg, const rclcpp::MessageInfo & msg_info)> callback;
                                                                ^~~~~~~~~~~
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp: In static member function ‘static void ros1_bridge::Factory<ROS1_T, ROS2_T>::ros2_callback(typename ROS2_T::SharedPtr, const int&, ros::Publisher, const string&, const string&, rclcpp::Logger, rclcpp::PublisherBase::SharedPtr)’:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:203:19: error: request for member ‘get_rmw_message_info’ in ‘msg_info’, which is of non-class typeconst int’
         &msg_info.get_rmw_message_info().publisher_gid,
                   ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/ros1_bridge.dir/generated/get_factory.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/hsd/tmp/bridge_ws/src/ros1_bridge/build/ros1_bridge/generated/action_msgs_factories.hpp:6:0,
                 from /home/hsd/tmp/bridge_ws/src/ros1_bridge/build/ros1_bridge/generated/action_msgs_factories.cpp:3:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:193:19: error: ‘MessageInfo’ in namespace ‘rclcpp’ does not name a type
     const rclcpp::MessageInfo & msg_info,
                   ^~~~~~~~~~~
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp: In member function ‘rclcpp::SubscriptionBase::SharedPtr ros1_bridge::Factory<ROS1_T, ROS2_T>::create_ros2_subscriber(rclcpp::Node::SharedPtr, const string&, const rmw_qos_profile_t&, ros::Publisher, rclcpp::PublisherBase::SharedPtr)’:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:120:64: error: ‘MessageInfo’ in namespace ‘rclcpp’ does not name a type
       void(const typename ROS2_T::SharedPtr msg, const rclcpp::MessageInfo & msg_info)> callback;
                                                                ^~~~~~~~~~~
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp: In static member function ‘static void ros1_bridge::Factory<ROS1_T, ROS2_T>::ros2_callback(typename ROS2_T::SharedPtr, const int&, ros::Publisher, const string&, const string&, rclcpp::Logger, rclcpp::PublisherBase::SharedPtr)’:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:203:19: error: request for member ‘get_rmw_message_info’ in ‘msg_info’, which is of non-class typeconst int’
         &msg_info.get_rmw_message_info().publisher_gid,
                   ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/ros1_bridge.dir/generated/action_msgs_factories.cpp.o] Error 1
In file included from /home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/builtin_interfaces_factories.hpp:29:0,
                 from /home/hsd/tmp/bridge_ws/src/ros1_bridge/src/builtin_interfaces_factories.cpp:21:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:193:19: error: ‘MessageInfo’ in namespace ‘rclcpp’ does not name a type
     const rclcpp::MessageInfo & msg_info,
                   ^~~~~~~~~~~
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp: In member function ‘rclcpp::SubscriptionBase::SharedPtr ros1_bridge::Factory<ROS1_T, ROS2_T>::create_ros2_subscriber(rclcpp::Node::SharedPtr, const string&, const rmw_qos_profile_t&, ros::Publisher, rclcpp::PublisherBase::SharedPtr)’:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:120:64: error: ‘MessageInfo’ in namespace ‘rclcpp’ does not name a type
       void(const typename ROS2_T::SharedPtr msg, const rclcpp::MessageInfo & msg_info)> callback;
                                                                ^~~~~~~~~~~
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp: In static member function ‘static void ros1_bridge::Factory<ROS1_T, ROS2_T>::ros2_callback(typename ROS2_T::SharedPtr, const int&, ros::Publisher, const string&, const string&, rclcpp::Logger, rclcpp::PublisherBase::SharedPtr)’:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:203:19: error: request for member ‘get_rmw_message_info’ in ‘msg_info’, which is of non-class typeconst int’
         &msg_info.get_rmw_message_info().publisher_gid,
                   ^~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/eloquent/include/rclcpp/node_interfaces/node_topics_interface.hpp:29:0,
                 from /opt/ros/eloquent/include/rclcpp/node.hpp:53,
                 from /opt/ros/eloquent/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/eloquent/include/rclcpp/executors.hpp:22,
                 from /opt/ros/eloquent/include/rclcpp/rclcpp.hpp:145,
                 from /home/hsd/tmp/bridge_ws/src/ros1_bridge/src/builtin_interfaces_factories.cpp:18:
/opt/ros/eloquent/include/rclcpp/subscription_factory.hpp: In instantiation of ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Time_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >]’:
/opt/ros/eloquent/include/rclcpp/create_subscription.hpp:67:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Time_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> >; NodeT = rclcpp::Node&; std::__cxx11::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/eloquent/include/rclcpp/node_impl.hpp:96:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Time_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> >; std::__cxx11::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >]’
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:129:48:   required from ‘rclcpp::SubscriptionBase::SharedPtr ros1_bridge::Factory<ROS1_T, ROS2_T>::create_ros2_subscriber(rclcpp::Node::SharedPtr, const string&, const rmw_qos_profile_t&, ros::Publisher, rclcpp::PublisherBase::SharedPtr) [with ROS1_T = std_msgs::Time_<std::allocator<void> >; ROS2_T = builtin_interfaces::msg::Time_<std::allocator<void> >; rclcpp::SubscriptionBase::SharedPtr = std::shared_ptr<rclcpp::SubscriptionBase>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; std::__cxx11::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_t; rclcpp::PublisherBase::SharedPtr = std::shared_ptr<rclcpp::PublisherBase>]’
/home/hsd/tmp/bridge_ws/src/ros1_bridge/src/builtin_interfaces_factories.cpp:107:1:   required from here
/opt/ros/eloquent/include/rclcpp/subscription_factory.hpp:87:3: error: no matching function for call to ‘rclcpp::AnySubscriptionCallback<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> >::set(std::function<void(std::shared_ptr<builtin_interfaces::msg::Time_<std::allocator<void> > >, const int&)>&)’
   any_subscription_callback.set(std::forward<CallbackT>(callback));
   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/eloquent/include/rclcpp/subscription_base.hpp:26:0,
                 from /opt/ros/eloquent/include/rclcpp/callback_group.hpp:26,
                 from /opt/ros/eloquent/include/rclcpp/any_executable.hpp:20,
                 from /opt/ros/eloquent/include/rclcpp/memory_strategy.hpp:24,
                 from /opt/ros/eloquent/include/rclcpp/memory_strategies.hpp:18,
                 from /opt/ros/eloquent/include/rclcpp/executor.hpp:33,
                 from /opt/ros/eloquent/include/rclcpp/executors/multi_threaded_executor.hpp:25,
                 from /opt/ros/eloquent/include/rclcpp/executors.hpp:21,
                 from /opt/ros/eloquent/include/rclcpp/rclcpp.hpp:145,
                 from /home/hsd/tmp/bridge_ws/src/ros1_bridge/src/builtin_interfaces_factories.cpp:18:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:82:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<builtin_interfaces::msg::Time_<std::allocator<void> > >)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:82:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:80:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:80:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:96:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<builtin_interfaces::msg::Time_<std::allocator<void> > >, const rmw_message_info_t&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rmw_message_info_t&)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:96:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:94:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:94:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:110:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const builtin_interfaces::msg::Time_<std::allocator<void> > >)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:110:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:108:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:108:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:124:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const builtin_interfaces::msg::Time_<std::allocator<void> > >, const rmw_message_info_t&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>, const rmw_message_info_t&)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:124:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:122:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:122:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:138:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<builtin_interfaces::msg::Time_<std::allocator<void> >, std::default_delete<builtin_interfaces::msg::Time_<std::allocator<void> > > >)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:138:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:136:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:136:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:152:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<builtin_interfaces::msg::Time_<std::allocator<void> >, std::default_delete<builtin_interfaces::msg::Time_<std::allocator<void> > > >, const rmw_message_info_t&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>, const rmw_message_info_t&)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:152:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:150:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:150:17: note: invalid template non-type parameter
In file included from /opt/ros/eloquent/include/rclcpp/node_interfaces/node_topics_interface.hpp:29:0,
                 from /opt/ros/eloquent/include/rclcpp/node.hpp:53,
                 from /opt/ros/eloquent/include/rclcpp/executors/single_threaded_executor.hpp:28,
                 from /opt/ros/eloquent/include/rclcpp/executors.hpp:22,
                 from /opt/ros/eloquent/include/rclcpp/rclcpp.hpp:145,
                 from /home/hsd/tmp/bridge_ws/src/ros1_bridge/src/builtin_interfaces_factories.cpp:18:
/opt/ros/eloquent/include/rclcpp/subscription_factory.hpp: In instantiation of ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >]’:
/opt/ros/eloquent/include/rclcpp/create_subscription.hpp:67:63:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::create_subscription(NodeT&&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> >; NodeT = rclcpp::Node&; std::__cxx11::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/eloquent/include/rclcpp/node_impl.hpp:96:47:   required from ‘std::shared_ptr<SubscriptionT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> >; std::__cxx11::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >]’
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:129:48:   required from ‘rclcpp::SubscriptionBase::SharedPtr ros1_bridge::Factory<ROS1_T, ROS2_T>::create_ros2_subscriber(rclcpp::Node::SharedPtr, const string&, const rmw_qos_profile_t&, ros::Publisher, rclcpp::PublisherBase::SharedPtr) [with ROS1_T = std_msgs::Duration_<std::allocator<void> >; ROS2_T = builtin_interfaces::msg::Duration_<std::allocator<void> >; rclcpp::SubscriptionBase::SharedPtr = std::shared_ptr<rclcpp::SubscriptionBase>; rclcpp::Node::SharedPtr = std::shared_ptr<rclcpp::Node>; std::__cxx11::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_t; rclcpp::PublisherBase::SharedPtr = std::shared_ptr<rclcpp::PublisherBase>]’
/home/hsd/tmp/bridge_ws/src/ros1_bridge/src/builtin_interfaces_factories.cpp:107:1:   required from here
/opt/ros/eloquent/include/rclcpp/subscription_factory.hpp:87:3: error: no matching function for call to ‘rclcpp::AnySubscriptionCallback<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> >::set(std::function<void(std::shared_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> > >, const int&)>&)’
   any_subscription_callback.set(std::forward<CallbackT>(callback));
   ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/eloquent/include/rclcpp/subscription_base.hpp:26:0,
                 from /opt/ros/eloquent/include/rclcpp/callback_group.hpp:26,
                 from /opt/ros/eloquent/include/rclcpp/any_executable.hpp:20,
                 from /opt/ros/eloquent/include/rclcpp/memory_strategy.hpp:24,
                 from /opt/ros/eloquent/include/rclcpp/memory_strategies.hpp:18,
                 from /opt/ros/eloquent/include/rclcpp/executor.hpp:33,
                 from /opt/ros/eloquent/include/rclcpp/executors/multi_threaded_executor.hpp:25,
                 from /opt/ros/eloquent/include/rclcpp/executors.hpp:21,
                 from /opt/ros/eloquent/include/rclcpp/rclcpp.hpp:145,
                 from /home/hsd/tmp/bridge_ws/src/ros1_bridge/src/builtin_interfaces_factories.cpp:18:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:82:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> > >)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:82:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:80:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:80:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:96:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> > >, const rmw_message_info_t&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<_Tp>, const rmw_message_info_t&)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:96:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:94:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:94:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:110:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const builtin_interfaces::msg::Duration_<std::allocator<void> > >)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:110:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:108:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:108:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:124:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const builtin_interfaces::msg::Duration_<std::allocator<void> > >, const rmw_message_info_t&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::shared_ptr<const _Tp>, const rmw_message_info_t&)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:124:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:122:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:122:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:138:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::default_delete<builtin_interfaces::msg::Duration_<std::allocator<void> > > >)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:138:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:136:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:136:17: note: invalid template non-type parameter
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:152:8: note: candidate: template<class CallbackT, typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::default_delete<builtin_interfaces::msg::Duration_<std::allocator<void> > > >, const rmw_message_info_t&)> >::value, void>::type* <anonymous> > void rclcpp::AnySubscriptionCallback<MessageT, Alloc>::set(CallbackT) [with CallbackT = CallbackT; typename std::enable_if<rclcpp::function_traits::same_arguments<CallbackT, std::function<void(std::unique_ptr<MessageT, typename std::conditional<std::is_same<typename std::allocator_traits<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type>::rebind_alloc<MessageT>, typename std::allocator<void>::rebind<_Tp1>::other>::value, std::default_delete<_Tp>, rclcpp::allocator::AllocatorDeleter<typename std::allocator_traits<_Alloc>::rebind_traits<MessageT>::allocator_type> >::type>, const rmw_message_info_t&)> >::value>::type* <anonymous> = <enumerator>; MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; Alloc = std::allocator<void>]
   void set(CallbackT callback)
        ^~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:152:8: note:   template argument deduction/substitution failed:
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:150:17: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
     >::type * = nullptr
                 ^~~~~~~
/opt/ros/eloquent/include/rclcpp/any_subscription_callback.hpp:150:17: note: invalid template non-type parameter
In file included from /usr/include/c++/7/future:48:0,
                 from /opt/ros/eloquent/include/rclcpp/executors.hpp:18,
                 from /opt/ros/eloquent/include/rclcpp/rclcpp.hpp:145,
                 from /home/hsd/tmp/bridge_ws/src/ros1_bridge/src/builtin_interfaces_factories.cpp:18:
/usr/include/c++/7/bits/std_function.h: At global scope:
/usr/include/c++/7/bits/std_function.h:685:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Time_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = std::shared_ptr<rclcpp::SubscriptionBase>; _ArgTypes = {rclcpp::node_interfaces::NodeBaseInterface*, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const rclcpp::QoS&}]’, declared using local type ‘rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Time_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Time_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Time_<std::allocator<void> >, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>’, is used but never defined [-fpermissive]
       function<_Res(_ArgTypes...)>::
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/std_function.h:685:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>; <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = std::shared_ptr<rclcpp::SubscriptionBase>; _ArgTypes = {rclcpp::node_interfaces::NodeBaseInterface*, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, const rclcpp::QoS&}]’, declared using local type ‘rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; CallbackT = std::function<void(std::shared_ptr<builtin_interfaces::msg::Duration_<std::allocator<void> > >, const int&)>&; AllocatorT = std::allocator<void>; CallbackMessageT = builtin_interfaces::msg::Duration_<std::allocator<void> >; SubscriptionT = rclcpp::Subscription<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void>, rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<builtin_interfaces::msg::Duration_<std::allocator<void> >, std::allocator<void> > >]::<lambda(rclcpp::node_interfaces::NodeBaseInterface*, const string&, const rclcpp::QoS&)>’, is used but never defined [-fpermissive]
make[2]: *** [CMakeFiles/ros1_bridge.dir/src/builtin_interfaces_factories.cpp.o] Error 1
In file included from /home/hsd/tmp/bridge_ws/src/ros1_bridge/build/ros1_bridge/generated/action_msgs_factories.hpp:6:0,
                 from /home/hsd/tmp/bridge_ws/src/ros1_bridge/build/ros1_bridge/generated/action_msgs__msg__GoalInfo__factories.cpp:3:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:193:19: error: ‘MessageInfo’ in namespace ‘rclcpp’ does not name a type
     const rclcpp::MessageInfo & msg_info,
                   ^~~~~~~~~~~
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp: In member function ‘rclcpp::SubscriptionBase::SharedPtr ros1_bridge::Factory<ROS1_T, ROS2_T>::create_ros2_subscriber(rclcpp::Node::SharedPtr, const string&, const rmw_qos_profile_t&, ros::Publisher, rclcpp::PublisherBase::SharedPtr)’:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:120:64: error: ‘MessageInfo’ in namespace ‘rclcpp’ does not name a type
       void(const typename ROS2_T::SharedPtr msg, const rclcpp::MessageInfo & msg_info)> callback;
                                                                ^~~~~~~~~~~
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp: In static member function ‘static void ros1_bridge::Factory<ROS1_T, ROS2_T>::ros2_callback(typename ROS2_T::SharedPtr, const int&, ros::Publisher, const string&, const string&, rclcpp::Logger, rclcpp::PublisherBase::SharedPtr)’:
/home/hsd/tmp/bridge_ws/src/ros1_bridge/include/ros1_bridge/factory.hpp:203:19: error: request for member ‘get_rmw_message_info’ in ‘msg_info’, which is of non-class typeconst int’
         &msg_info.get_rmw_message_info().publisher_gid,
                   ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/ros1_bridge.dir/generated/action_msgs__msg__GoalInfo__factories.cpp.o] Error 1
make[1]: *** [CMakeFiles/ros1_bridge.dir/all] Error 2
make: *** [all] Error 2
---
Failed   <<< ros1_bridge	[ Exited with code 2 ]

Summary: 0 packages finished [36.8s]
  1 package failed: ros1_bridge
  1 package had stderr output: ros1_bridge

@hsd-dev
Copy link
Contributor Author

hsd-dev commented May 8, 2020

Ah I'll have to compile ROS2 master branch from source as well or use nightly build / Docker.

@ros-discourse
Copy link

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/wat-we-can-do-here/14035/3

@dirk-thomas dirk-thomas changed the base branch from eloquent to master May 20, 2020 22:42
@dirk-thomas
Copy link
Member

The PR is for eloquent because I am having issues compiling the master branch (even without the action_bridge). Any help here welcome.

I have changed the target branch of the PR to master since we don't accept changes targeting older branches (except if the patch only applies to that branch and isn't needed for master). I have also rebased the branch on top of master.

Copy link
Member

@dirk-thomas dirk-thomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the build log for master branch

The rebased branch builds just fine for me with master in upcoming Foxy. I added a few comments inline and would ask you to also address the following:

  • Please also update the dynamic_bridge to support actions beside topics and services.
  • Please also add a section to the readme with an example for bridging actions.
  • Please run the unit tests of the package which includes the linters and address the various style warnings.

@@ -103,7 +105,7 @@ foreach(package_name ${ros2_interface_packages})
file(TO_CMAKE_PATH "${interface_file}" interface_name)
get_filename_component(interface_basename "${interface_name}" NAME_WE)
# skipping actions and request and response messages of services
if(NOT "${interface_name}" MATCHES "^(msg|srv)/" OR "${interface_basename}" MATCHES "_(Request|Response)$")
if(NOT "${interface_name}" MATCHES "^(msg|srv|action)/" OR "${interface_basename}" MATCHES "_(Request|Response)$")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since _(Request|Response)$ are explicitly being skipped I would expect something similar to be necessary for the parts of actions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting the same, but it doesn't generate _Goal, _Feedback, _Result, so I skipped it.

// {
// server_.start();
// client_ = rclcpp_action::create_client<ROS2_T>(ros2_node, action_name);
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this comment? Probably to be removed.

Same below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I should delete that.

std::bind(&ActionFactory_1_2::goal_cb, this, std::placeholders::_1),
std::bind(&ActionFactory_1_2::cancel_cb, this, std::placeholders::_1),
false);
server_->start();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this only be started after the client_ has been created?

@dirk-thomas
Copy link
Member

@ ipa-hsd Friendly ping.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Jun 5, 2020

Sorry for the delay. I rebased my branch on master and it builds fine now. I will work on the the remaining things soon and update the PR.

BTW while creating the docker image, I used the nightly build for ROS2 and I had the same issues as in ament/ament_cmake#173, but for different packages.

share/class_loader/cmake/class_loaderExport.cmake:  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;/home/jenkins-agent/workspace/packaging_linux/ws/install/include"
share/rcl/cmake/rclExport.cmake:  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;/home/jenkins-agent/workspace/packaging_linux/ws/install/include"
share/rosbag2_transport/cmake/export_rosbag2_transportExport.cmake:  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;/home/jenkins-agent/workspace/packaging_linux/ws/install/include;/home/jenkins-agent/workspace/packaging_linux/ws/install/opt/yaml_cpp_vendor/lib/cmake/yaml-cpp/../../../include;/usr/include"
share/tf2/cmake/tf2Export.cmake:  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include;/home/jenkins-agent/workspace/packaging_linux/ws/install/include"

Is this a known issue or I need to file a new ticket?

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have action_bridge for dedicated binary? I was thinking adding action_bridge feature for dynamic, static bridges would be better for user.

include/ros1_bridge/action_factory.hpp Outdated Show resolved Hide resolved
include/ros1_bridge/action_factory.hpp Outdated Show resolved Hide resolved
include/ros1_bridge/action_factory.hpp Outdated Show resolved Hide resolved
include/ros1_bridge/action_factory.hpp Outdated Show resolved Hide resolved
include/ros1_bridge/action_factory.hpp Outdated Show resolved Hide resolved
@hsd-dev
Copy link
Contributor Author

hsd-dev commented Jun 9, 2020

do we have action_bridge for dedicated binary? I was thinking adding action_bridge feature for dynamic, static bridges would be better for user.

As @dirk-thomas commented, I will add the feature to the dynamic_bridge. Currently I also have a dedicated binary which takes the direction, type and name of action interface as arguments.

Comment on lines 92 to 111
void goal_cb(ROS1GoalHandle gh1)
{
const std::string goal_id = gh1.getGoalID().id;

// create a new handler for the goal
std::shared_ptr<GoalHandler> handler;
handler.reset(new GoalHandler(gh1, client_));
std::lock_guard<std::mutex> lock(mutex_);
goals_.insert(std::make_pair(goal_id, handler));

RCLCPP_INFO(ros2_node_->get_logger(), "Sending goal");
std::thread([handler, goal_id, this]() mutable {
// execute the goal remotely
handler->handle();

// clean-up
std::lock_guard<std::mutex> lock(mutex_);
goals_.erase(goal_id);
}).detach();
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion:
ROS1 action support goal preempt. But ROS2 doesn't support it.
According to current implementation, action bridge does nothing for goal preempt.
Maybe it is better to output warning log while goal preempt is requested by ROS1 client.
User can be easy to find the problem while using action bridge.

Comment on lines 15 to 16
#ifndef ACTION_BRIDGE__ACTION_BRIDGE_HPP_
#define ACTION_BRIDGE__ACTION_BRIDGE_HPP_

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The style is different from existing codes.
e.g.
ros1_bridge/include/ros1_bridge/bridge.hpp

#ifndef ROS1_BRIDGE__BRIDGE_HPP_
#define ROS1_BRIDGE__BRIDGE_HPP_

@dirk-thomas
Copy link
Member

@ipa-hsd Any update on this?

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Jul 17, 2020

@dirk-thomas The Dockerfile is not generating the interfaces anymore. The interface mapping files were empty. This is my Dockerfile:

FROM ubuntu:20.04

SHELL ["/bin/bash", "-c"]

RUN apt update
RUN apt-get install -y gnupg2 lsb-release

RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
#
# setup sources.list 
RUN echo "deb http://packages.ros.org/ros-testing/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-testing.list
RUN cat /etc/apt/sources.list.d/ros-testing.list

ENV ROS1_DISTRO noetic
ENV ROS2_DISTRO foxy 

# update latest package versions
RUN apt-get update

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata

# install ROS1 dependencies
RUN apt-get install -y \
    ros-$ROS1_DISTRO-roscpp-tutorials \
    ros-$ROS1_DISTRO-rospy-tutorials \
    ros-$ROS1_DISTRO-actionlib-tutorials \
    ros-$ROS1_DISTRO-control-msgs \
    && rm -rf /var/lib/apt/lists/*

#install ROS2 nightly build
RUN apt-get update && apt-get install -y wget
RUN mkdir /ros2_ws
WORKDIR /ros2_ws
RUN wget -nv https://ci.ros2.org/view/packaging/job/packaging_linux/lastSuccessfulBuild/artifact/ws/ros2-package-linux-x86_64.tar.bz2
RUN tar -xjf ros2-package-linux-x86_64.tar.bz2

RUN apt-get update && apt-get install -y \
                        git \
                        python3-colcon-common-extensions \
                        build-essential \
                        cmake \
                        libssl-dev \
                        python3-lark-parser \
                        python3-pip

RUN apt-get update && apt-get install -y \
    ros-$ROS1_DISTRO-ros-comm

RUN mkdir -p /bridge_ws/src/
WORKDIR /bridge_ws/src/

ARG SOURCE_VER=unknown
RUN git clone -b action_bridge --depth=1 https://github.com/ipa-hsd/ros1_bridge
WORKDIR /bridge_ws/

ARG UPSTREAM_CI_WS=/home/jenkins-agent/workspace/packaging_linux/ws
RUN mkdir -p $UPSTREAM_CI_WS && ln -s /ros2_ws/ros2-linux $UPSTREAM_CI_WS/install

RUN . /opt/ros/noetic/local_setup.bash \
    && . /ros2_ws/ros2-linux/local_setup.bash \
    && colcon build --symlink-install \
    && . install/local_setup.bash

RUN exec "$@"

We will be done with ROS training this week. I will take a look at it again.

@ThijsRay
Copy link

@ipa-hsd Do you have an update on this?

@clalancette clalancette added the more-information-needed Further information is required label Nov 5, 2020
@v-lopez
Copy link

v-lopez commented Nov 11, 2020

I did try the branch last week and it had some python errors that I hacked around with this patch but I could not get to work, whether due to my changes or some other stuff.

+++ b/ros1_bridge/__init__.py
@@ -154,6 +154,7 @@ def generate_cpp(output_path, template_dir):
                     'interface': interface,
                     'mapped_msgs': [],
                     'mapped_services': [],
+                    'mapped_actions': [],
                 }
                 if interface_type == 'msg':
                     data_idl_cpp['mapped_msgs'] += [
@@ -164,12 +165,12 @@ def generate_cpp(output_path, template_dir):
                     data_idl_cpp['mapped_services'] += [
                         s for s in data['services']
                         if s['ros2_package'] == ros2_package_name and
-                        s['ros2_name'] == interface.message_name],
-                    'mapped_actions': [
+                        s['ros2_name'] == interface.message_name]
+                if interface_type == 'action':
+                    data_idl_cpp['mapped_actions'] += [
                         s for s in data['actions']
                         if s['ros2_package'] == ros2_package_name and
-                        s['ros2_name'] == interface.message_name],
-                }
+                        s['ros2_name'] == interface.message_name]
                 template_file = os.path.join(
                     template_dir, 'interface_fact

I'd like to help on this, as for us it's a blocking feature before starting moving robots to ROS2.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Nov 11, 2020

@v-lopez thanks for the offer. I can ping you next week to start working on this again. Sorry for keeping this hanging for so long.

@v-lopez
Copy link

v-lopez commented Nov 13, 2020

@ipa-hsd hsd-dev#1 fixes build issues for me, and I get both ROS1 -> ROS2 and ROS2 -> ROS1 communication.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Nov 17, 2020

Not sure if the signoff went wrong since quite some old commits have been stacked here. Tested the bridge and works well with the master branch. Running the tests shows some styling errors. TODO: add action_bridge to dynamic_bridge.

hsd-dev added 8 commits March 27, 2023 10:19
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
…ame in the enclosing class

Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 27, 2023

@gbiggs https://github.com/ros2/ros1_bridge/actions/runs/4531657621/jobs/7982075544?pr=256#step:3:146

Error: The process '/usr/bin/sudo' failed with exit code 100

@gavanderhoorn
Copy link

@ipa-hsd: trying to build this (on ros:galactic-ros-base-focal) I see a consistent:

ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies:
ros1_bridge: Cannot locate rosdep definition for [xmlrpcpp]

is this a known error?

(apologies if I missed a comment/discussion above, I've not checked all of them)

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Mar 27, 2023

It is available only in ROS 1, so it won't be found: https://github.com/ros/rosdistro/blob/7602c7e0873370496b3f84d119a16202e1122038/noetic/distribution.yaml#L8629

It was introduced in #331

Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
@gavanderhoorn
Copy link

gavanderhoorn commented Mar 27, 2023

@ipa-hsd:

@gbiggs https://github.com/ros2/ros1_bridge/actions/runs/4531657621/jobs/7982075544?pr=256#step:3:146

Error: The process '/usr/bin/sudo' failed with exit code 100

The actual error appears to be:

E: The repository 'http://packages.ros.org/ros/ubuntu jammy Release' does not have a Release file.

btw.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented May 4, 2023

@gbiggs how can we proceed on this?

@sea-bass
Copy link

@gbiggs how can we proceed on this?

Seems like #398 fixes this issue.

I've just started looking into action bridging solutions and this PR looks quite promising, so looking forward to it and happy to help however I can.

@hsd-dev
Copy link
Contributor Author

hsd-dev commented Jun 26, 2023

@gbiggs ping.

@ErickKramer
Copy link

Hi @ipa-hsd,
First of all, I wanted to thank you for your effort to bring this functionality into the ros1_bridge.

I ran into your PR and encountered some problems while trying to bridge one of our actions.

While using a mapping_rules.yaml file, I was running into re-definition errors. I managed to overcome this problem, by applying the same patch introduced in #268 for the services. I did this in ErickKramer@0156471

Also, I encountered a hard constraint in the way that the translate_@ method is geenrated in the interface_factories.cpp.em template. As it is in this PR, it will fail to compile if one uses goal, result, or feedback as one of the attributes for the action. It generates auto & result1 = result1.result;. I understand that using those keywords would be considered a bad practice, but this was used in one of our legacy actions, and it would've been quite painful to change.

As I could not come up with a nicer solution to this, I hacked my way around it by adding _type whenever type.lower() was used. I did this in ErickKramer@8b5184e.

I just wanted to report on these two issues I encountered and document my solutions, in case some one else suffer from them.

@linukc
Copy link

linukc commented Aug 29, 2023

Hi @ipa-hsd, thx for your great work first of all.

May I ask you for instructions on how to run the action_bridge? I tried the latest commit in this PR with ros noetic+humble on ubuntu20.04, but got errors like in this log file. Also I saw example of running action_bridge with noetic+foxy, but I struggle to figure out which commit of this PR was used.

abencz pushed a commit to locusrobotics/ros1_bridge that referenced this pull request Feb 7, 2024
Squash of upstream PR: ros2#256

Co-authored-by: tomoya <Tomoya.Fujita@sony.com>
Co-authored-by: Geoffrey Biggs <gbiggs@killbots.net>
Signed-off-by: Victor Lopez <victor.lopez@pal-robotics.com>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
Wassim-Hammami-iw pushed a commit to MarcoMatteoBassa/ros1_bridge that referenced this pull request Sep 3, 2024
Squash of upstream PR: ros2#256

Co-authored-by: tomoya <Tomoya.Fujita@sony.com>
Co-authored-by: Geoffrey Biggs <gbiggs@killbots.net>
Signed-off-by: Victor Lopez <victor.lopez@pal-robotics.com>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
gavanderhoorn pushed a commit to gavanderhoorn/ros1_bridge that referenced this pull request Oct 21, 2024
Co-authored-by: tomoya <Tomoya.Fujita@sony.com>
Co-authored-by: Geoffrey Biggs <gbiggs@killbots.net>
Signed-off-by: Victor Lopez <victor.lopez@pal-robotics.com>
Signed-off-by: Harsh Deshpande <harshavardhan.deshpande@ipa.fraunhofer.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request more-information-needed Further information is required requires-changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.