This commit is contained in:
Quella777
2025-08-24 15:56:33 +08:00
parent 779497c09e
commit ba6b299509
83 changed files with 3100 additions and 116 deletions

View File

@@ -0,0 +1,2 @@
Invoking command in '/home/quella/ROS2Demo/service/service_server/build/service_server': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/quella/ROS2Demo/service/service_server/build/service_server -- -j16 -l16
Invoked command in '/home/quella/ROS2Demo/service/service_server/build/service_server' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/quella/ROS2Demo/service/service_server/build/service_server -- -j16 -l16

View File

@@ -0,0 +1,61 @@
In file included from /opt/ros/humble/include/rclcpp/rclcpp/service.hpp:36,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:1:
/opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp: In instantiation of void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT&&) [with CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename std::enable_if<(! rclcpp::detail::can_be_nullptr<CallbackT>::value), int>::type <anonymous> = 0; ServiceT = service_interfaces::srv::Patrol]:
/opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp:43:27: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:147:53: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:16:54: required from here
/opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp:103:17: error: no match for operator= (operand types are std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> > and std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>)
103 | callback_ = std::forward<CallbackT>(callback);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:1:
/usr/include/c++/11/variant:1461:9: note: candidate: template<class _Tp> std::enable_if_t<((__exactly_once<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type> > && is_constructible_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>, _Tp>) && is_assignable_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>&, _Tp>), std::variant<_Types>&> std::variant<_Types>::operator=(_Tp&&) [with _Tp = _Tp; _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]
1461 | operator=(_Tp&& __rhs)
| ^~~~~~~~
/usr/include/c++/11/variant:1461:9: note:  template argument deduction/substitution failed:
/usr/include/c++/11/variant: In substitution of template<class ... _Types> template<class _Tp, class> using __accepted_type = std::variant<_Types>::__to_type<__accepted_index<_Tp> > [with _Tp = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>&&; <template-parameter-2-2> = void; _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]:
/usr/include/c++/11/variant:1457:14: required by substitution of template<class _Tp> std::enable_if_t<((__exactly_once<std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type> > && is_constructible_v<std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>, _Tp>) && is_assignable_v<std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>&, _Tp>), std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >&> std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::operator=<_Tp>(_Tp&&) [with _Tp = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>]
/opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp:103:17: required from void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT&&) [with CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename std::enable_if<(! rclcpp::detail::can_be_nullptr<CallbackT>::value), int>::type <anonymous> = 0; ServiceT = service_interfaces::srv::Patrol]
/opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp:43:27: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:147:53: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:16:54: required from here
/usr/include/c++/11/variant:1375:15: error: no type named type in struct std::enable_if<false, void>
1375 | using __accepted_type = __to_type<__accepted_index<_Tp>>;
| ^~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp: In instantiation of void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT&&) [with CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename std::enable_if<(! rclcpp::detail::can_be_nullptr<CallbackT>::value), int>::type <anonymous> = 0; ServiceT = service_interfaces::srv::Patrol]:
/opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp:43:27: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:147:53: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:16:54: required from here
/usr/include/c++/11/variant:1398:16: note: candidate: std::variant<_Types>& std::variant<_Types>::operator=(const std::variant<_Types>&) [with _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]
1398 | variant& operator=(const variant&) = default;
| ^~~~~~~~
/usr/include/c++/11/variant:1398:26: note:  no known conversion for argument 1 from std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)> to const std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >&
1398 | variant& operator=(const variant&) = default;
| ^~~~~~~~~~~~~~
/usr/include/c++/11/variant:1399:16: note: candidate: std::variant<_Types>& std::variant<_Types>::operator=(std::variant<_Types>&&) [with _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]
1399 | variant& operator=(variant&&) = default;
| ^~~~~~~~
/usr/include/c++/11/variant:1399:26: note:  no known conversion for argument 1 from std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)> to std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >&&
1399 | variant& operator=(variant&&) = default;
| ^~~~~~~~~
gmake[2]: *** [CMakeFiles/turtle_contrl.dir/build.make:76: CMakeFiles/turtle_contrl.dir/src/turtle_contrl.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/turtle_contrl.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

View File

@@ -0,0 +1,2 @@
Consolidate compiler generated dependencies of target turtle_contrl
[ 50%] Building CXX object CMakeFiles/turtle_contrl.dir/src/turtle_contrl.cpp.o

View File

@@ -0,0 +1,63 @@
Consolidate compiler generated dependencies of target turtle_contrl
[ 50%] Building CXX object CMakeFiles/turtle_contrl.dir/src/turtle_contrl.cpp.o
In file included from /opt/ros/humble/include/rclcpp/rclcpp/service.hpp:36,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:1:
/opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp: In instantiation of void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT&&) [with CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename std::enable_if<(! rclcpp::detail::can_be_nullptr<CallbackT>::value), int>::type <anonymous> = 0; ServiceT = service_interfaces::srv::Patrol]:
/opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp:43:27: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:147:53: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:16:54: required from here
/opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp:103:17: error: no match for operator= (operand types are std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> > and std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>)
103 | callback_ = std::forward<CallbackT>(callback);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:1:
/usr/include/c++/11/variant:1461:9: note: candidate: template<class _Tp> std::enable_if_t<((__exactly_once<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type> > && is_constructible_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>, _Tp>) && is_assignable_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>&, _Tp>), std::variant<_Types>&> std::variant<_Types>::operator=(_Tp&&) [with _Tp = _Tp; _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]
1461 | operator=(_Tp&& __rhs)
| ^~~~~~~~
/usr/include/c++/11/variant:1461:9: note:  template argument deduction/substitution failed:
/usr/include/c++/11/variant: In substitution of template<class ... _Types> template<class _Tp, class> using __accepted_type = std::variant<_Types>::__to_type<__accepted_index<_Tp> > [with _Tp = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>&&; <template-parameter-2-2> = void; _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]:
/usr/include/c++/11/variant:1457:14: required by substitution of template<class _Tp> std::enable_if_t<((__exactly_once<std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type> > && is_constructible_v<std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>, _Tp>) && is_assignable_v<std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>&, _Tp>), std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >&> std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::operator=<_Tp>(_Tp&&) [with _Tp = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>]
/opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp:103:17: required from void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT&&) [with CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename std::enable_if<(! rclcpp::detail::can_be_nullptr<CallbackT>::value), int>::type <anonymous> = 0; ServiceT = service_interfaces::srv::Patrol]
/opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp:43:27: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:147:53: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:16:54: required from here
/usr/include/c++/11/variant:1375:15: error: no type named type in struct std::enable_if<false, void>
1375 | using __accepted_type = __to_type<__accepted_index<_Tp>>;
| ^~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp: In instantiation of void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT&&) [with CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename std::enable_if<(! rclcpp::detail::can_be_nullptr<CallbackT>::value), int>::type <anonymous> = 0; ServiceT = service_interfaces::srv::Patrol]:
/opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp:43:27: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:147:53: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
/home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:16:54: required from here
/usr/include/c++/11/variant:1398:16: note: candidate: std::variant<_Types>& std::variant<_Types>::operator=(const std::variant<_Types>&) [with _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]
1398 | variant& operator=(const variant&) = default;
| ^~~~~~~~
/usr/include/c++/11/variant:1398:26: note:  no known conversion for argument 1 from std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)> to const std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >&
1398 | variant& operator=(const variant&) = default;
| ^~~~~~~~~~~~~~
/usr/include/c++/11/variant:1399:16: note: candidate: std::variant<_Types>& std::variant<_Types>::operator=(std::variant<_Types>&&) [with _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]
1399 | variant& operator=(variant&&) = default;
| ^~~~~~~~
/usr/include/c++/11/variant:1399:26: note:  no known conversion for argument 1 from std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)> to std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >&&
1399 | variant& operator=(variant&&) = default;
| ^~~~~~~~~
gmake[2]: *** [CMakeFiles/turtle_contrl.dir/build.make:76: CMakeFiles/turtle_contrl.dir/src/turtle_contrl.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/turtle_contrl.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

View File

@@ -0,0 +1,65 @@
[0.009s] Invoking command in '/home/quella/ROS2Demo/service/service_server/build/service_server': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/quella/ROS2Demo/service/service_server/build/service_server -- -j16 -l16
[0.274s] Consolidate compiler generated dependencies of target turtle_contrl
[0.294s] [ 50%] Building CXX object CMakeFiles/turtle_contrl.dir/src/turtle_contrl.cpp.o
[2.786s] In file included from /opt/ros/humble/include/rclcpp/rclcpp/service.hpp:36,
[2.786s] from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:28,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
[2.787s] from /home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:1:
[2.787s] /opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp: In instantiation of void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT&&) [with CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename std::enable_if<(! rclcpp::detail::can_be_nullptr<CallbackT>::value), int>::type <anonymous> = 0; ServiceT = service_interfaces::srv::Patrol]:
[2.787s] /opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp:43:27: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
[2.787s] /opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:147:53: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
[2.787s] /home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:16:54: required from here
[2.787s] /opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp:103:17: error: no match for operator= (operand types are std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> > and std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>)
[2.787s] 103 | callback_ = std::forward<CallbackT>(callback);
[2.787s] | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2.787s] In file included from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:28,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
[2.787s] from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
[2.788s] from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
[2.788s] from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
[2.788s] from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
[2.788s] from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
[2.788s] from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
[2.788s] from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
[2.788s] from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
[2.788s] from /home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:1:
[2.788s] /usr/include/c++/11/variant:1461:9: note: candidate: template<class _Tp> std::enable_if_t<((__exactly_once<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type> > && is_constructible_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>, _Tp>) && is_assignable_v<std::variant<_Types>::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>&, _Tp>), std::variant<_Types>&> std::variant<_Types>::operator=(_Tp&&) [with _Tp = _Tp; _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]
[2.788s] 1461 | operator=(_Tp&& __rhs)
[2.788s] | ^~~~~~~~
[2.788s] /usr/include/c++/11/variant:1461:9: note:  template argument deduction/substitution failed:
[2.788s] /usr/include/c++/11/variant: In substitution of template<class ... _Types> template<class _Tp, class> using __accepted_type = std::variant<_Types>::__to_type<__accepted_index<_Tp> > [with _Tp = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>&&; <template-parameter-2-2> = void; _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]:
[2.788s] /usr/include/c++/11/variant:1457:14: required by substitution of template<class _Tp> std::enable_if_t<((__exactly_once<std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type> > && is_constructible_v<std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>, _Tp>) && is_assignable_v<std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::__accepted_type<_Tp&&, typename std::enable_if<__not_self<_Tp&&>, void>::type>&, _Tp>), std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >&> std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >::operator=<_Tp>(_Tp&&) [with _Tp = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>]
[2.788s] /opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp:103:17: required from void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT&&) [with CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename std::enable_if<(! rclcpp::detail::can_be_nullptr<CallbackT>::value), int>::type <anonymous> = 0; ServiceT = service_interfaces::srv::Patrol]
[2.788s] /opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp:43:27: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
[2.788s] /opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:147:53: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
[2.788s] /home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:16:54: required from here
[2.788s] /usr/include/c++/11/variant:1375:15: error: no type named type in struct std::enable_if<false, void>
[2.788s] 1375 | using __accepted_type = __to_type<__accepted_index<_Tp>>;
[2.788s] | ^~~~~~~~~~~~~~~
[2.789s] /opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp: In instantiation of void rclcpp::AnyServiceCallback<ServiceT>::set(CallbackT&&) [with CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename std::enable_if<(! rclcpp::detail::can_be_nullptr<CallbackT>::value), int>::type <anonymous> = 0; ServiceT = service_interfaces::srv::Patrol]:
[2.789s] /opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp:43:27: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::create_service(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>, std::shared_ptr<rclcpp::node_interfaces::NodeServicesInterface>, const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
[2.789s] /opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:147:53: required from typename rclcpp::Service<ServiceT>::SharedPtr rclcpp::Node::create_service(const string&, CallbackT&&, const rmw_qos_profile_t&, rclcpp::CallbackGroup::SharedPtr) [with ServiceT = service_interfaces::srv::Patrol; CallbackT = std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)>; typename rclcpp::Service<ServiceT>::SharedPtr = std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >; std::string = std::__cxx11::basic_string<char>; rmw_qos_profile_t = rmw_qos_profile_s; rclcpp::CallbackGroup::SharedPtr = std::shared_ptr<rclcpp::CallbackGroup>]
[2.789s] /home/quella/ROS2Demo/service/service_server/src/turtle_contrl.cpp:16:54: required from here
[2.789s] /usr/include/c++/11/variant:1398:16: note: candidate: std::variant<_Types>& std::variant<_Types>::operator=(const std::variant<_Types>&) [with _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]
[2.789s] 1398 | variant& operator=(const variant&) = default;
[2.789s] | ^~~~~~~~
[2.789s] /usr/include/c++/11/variant:1398:26: note:  no known conversion for argument 1 from std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)> to const std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >&
[2.789s] 1398 | variant& operator=(const variant&) = default;
[2.789s] | ^~~~~~~~~~~~~~
[2.789s] /usr/include/c++/11/variant:1399:16: note: candidate: std::variant<_Types>& std::variant<_Types>::operator=(std::variant<_Types>&&) [with _Types = {std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>}]
[2.789s] 1399 | variant& operator=(variant&&) = default;
[2.789s] | ^~~~~~~~
[2.789s] /usr/include/c++/11/variant:1399:26: note:  no known conversion for argument 1 from std::_Bind<void (TurtleController::*(TurtleController*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >, std::shared_ptr<turtlesim::msg::Pose_<std::allocator<void> > >)> to std::variant<std::monostate, std::function<void(std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >, std::shared_ptr<service_interfaces::srv::Patrol_Response_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)>, std::function<void(std::shared_ptr<rclcpp::Service<service_interfaces::srv::Patrol> >, std::shared_ptr<rmw_request_id_s>, std::shared_ptr<service_interfaces::srv::Patrol_Request_<std::allocator<void> > >)> >&&
[2.789s] 1399 | variant& operator=(variant&&) = default;
[2.789s] | ^~~~~~~~~
[3.253s] gmake[2]: *** [CMakeFiles/turtle_contrl.dir/build.make:76: CMakeFiles/turtle_contrl.dir/src/turtle_contrl.cpp.o] Error 1
[3.253s] gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/turtle_contrl.dir/all] Error 2
[3.253s] gmake: *** [Makefile:146: all] Error 2
[3.256s] Invoked command in '/home/quella/ROS2Demo/service/service_server/build/service_server' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/quella/ROS2Demo/service/service_server/build/service_server -- -j16 -l16