xin@user:~/mark_ws$ colcon build
Starting >>> class
Starting >>> office
Finished <<< office [0.11s]
--- stderr: class
In file included from /opt/ros/humble/include/rclcpp/rclcpp/logging.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:40,
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/xin/mark_ws/class/src/wang.cpp:1:
/home/xin/mark_ws/class/src/wang.cpp: In member function ‘void StudentNode::mark_callback(std_msgs::msg::Float32MultiArray_<std::allocator<void> >::SharedPtr)’:
/home/xin/mark_ws/class/src/wang.cpp:16:40: warning: format ‘%s’ expects argument of type ‘char*’, but argument 5 has type ‘std_msgs::msg::Float32MultiArray_<std::allocator<void> >::_data_type’ {aka ‘std::vector<float>’} [-Wformat=]
16 | RCLCPP_INFO(this->get_logger(),"收到分数了,我考了%s",mark->data);
| ^~~~~~~~~~~~~~~~~~~~~
/home/xin/mark_ws/class/src/wang.cpp:16:59: note: format string is defined here
16 | RCLCPP_INFO(this->get_logger(),"收到分数了,我考了%s",mark->data);
| ~^
| |
| char*
In file included from /opt/ros/humble/include/rclcpp/rclcpp/subscription_base.hpp:32,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:29,
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/xin/mark_ws/class/src/wang.cpp:1:
/opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp: In instantiation of ‘rclcpp::AnySubscriptionCallback<MessageT, AllocatorT> rclcpp::AnySubscriptionCallback<MessageT, AllocatorT>::set(CallbackT) [with CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; AllocatorT = std::allocator<void>]’:
/opt/ros/humble/include/rclcpp/rclcpp/subscription_factory.hpp:94:32: required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<ROSMessageType> >) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; ROSMessageType = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp:122:63: required from ‘std::shared_ptr<ROSMessageT> rclcpp::detail::create_subscription(NodeParametersT&, NodeTopicsT&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; NodeParametersT = rclcpp::Node; NodeTopicsT = rclcpp::Node; ROSMessageType = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp:191:76: required from ‘std::shared_ptr<ROSMessageT> rclcpp::create_subscription(NodeT&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; NodeT = rclcpp::Node; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:99:47: required from ‘std::shared_ptr<ROSMessageT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/home/xin/mark_ws/class/src/wang.cpp:25:77: required from here
/opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp:391:22: error: no matching function for call to ‘std::function<void(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>::function(std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>&)’
391 | set_deprecated(static_cast<typename scbth::callback_type>(callback));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/future:47,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/xin/mark_ws/class/src/wang.cpp:1:
/usr/include/c++/11/bits/std_function.h:435:9: note: candidate: ‘template<class _Functor, class _Constraints> std::function<_Res(_ArgTypes ...)>::function(_Functor&&) [with _Functor = _Functor; _Constraints = _Constraints; _Res = void; _ArgTypes = {std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >}]’
435 | function(_Functor&& __f)
| ^~~~~~~~
/usr/include/c++/11/bits/std_function.h:435:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/move.h:57,
from /usr/include/c++/11/bits/stl_pair.h:59,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/memory:63,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:153,
from /home/xin/mark_ws/class/src/wang.cpp:1:
/usr/include/c++/11/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using __enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]’:
/usr/include/c++/11/bits/std_function.h:353:8: required by substitution of ‘template<class _Res, class ... _ArgTypes> template<class _Cond, class _Tp> using _Requires = std::__enable_if_t<_Cond::value, _Tp> [with _Cond = std::function<void(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>::_Callable<std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>&, std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>, std::__invoke_result<std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>&, std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > > > >; _Tp = void; _Res = void; _ArgTypes = {std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >}]’
/usr/include/c++/11/bits/std_function.h:434:9: required from ‘rclcpp::AnySubscriptionCallback<MessageT, AllocatorT> rclcpp::AnySubscriptionCallback<MessageT, AllocatorT>::set(CallbackT) [with CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; AllocatorT = std::allocator<void>]’
/opt/ros/humble/include/rclcpp/rclcpp/subscription_factory.hpp:94:32: required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<ROSMessageType> >) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; ROSMessageType = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp:122:63: required from ‘std::shared_ptr<ROSMessageT> rclcpp::detail::create_subscription(NodeParametersT&, NodeTopicsT&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; NodeParametersT = rclcpp::Node; NodeTopicsT = rclcpp::Node; ROSMessageType = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp:191:76: required from ‘std::shared_ptr<ROSMessageT> rclcpp::create_subscription(NodeT&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; NodeT = rclcpp::Node; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:99:47: required from ‘std::shared_ptr<ROSMessageT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/home/xin/mark_ws/class/src/wang.cpp:25:77: required from here
/usr/include/c++/11/type_traits:2205:11: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
2205 | using __enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~~~
In file included from /usr/include/c++/11/future:47,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/xin/mark_ws/class/src/wang.cpp:1:
/opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp: In instantiation of ‘rclcpp::AnySubscriptionCallback<MessageT, AllocatorT> rclcpp::AnySubscriptionCallback<MessageT, AllocatorT>::set(CallbackT) [with CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; AllocatorT = std::allocator<void>]’:
/opt/ros/humble/include/rclcpp/rclcpp/subscription_factory.hpp:94:32: required from ‘rclcpp::SubscriptionFactory rclcpp::create_subscription_factory(CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<ROSMessageType> >) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; ROSMessageType = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp:122:63: required from ‘std::shared_ptr<ROSMessageT> rclcpp::detail::create_subscription(NodeParametersT&, NodeTopicsT&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; NodeParametersT = rclcpp::Node; NodeTopicsT = rclcpp::Node; ROSMessageType = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp:191:76: required from ‘std::shared_ptr<ROSMessageT> rclcpp::create_subscription(NodeT&, const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; NodeT = rclcpp::Node; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp:99:47: required from ‘std::shared_ptr<ROSMessageT> rclcpp::Node::create_subscription(const string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr) [with MessageT = std_msgs::msg::Float32MultiArray_<std::allocator<void> >; CallbackT = std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>; AllocatorT = std::allocator<void>; SubscriptionT = rclcpp::Subscription<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >; MessageMemoryStrategyT = rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> >; std::string = std::__cxx11::basic_string<char>; typename MessageMemoryStrategyT::SharedPtr = std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<std_msgs::msg::Float32MultiArray_<std::allocator<void> >, std::allocator<void> > >]’
/home/xin/mark_ws/class/src/wang.cpp:25:77: required from here
/usr/include/c++/11/bits/std_function.h:404:7: note: candidate: ‘std::function<_Res(_ArgTypes ...)>::function(std::function<_Res(_ArgTypes ...)>&&) [with _Res = void; _ArgTypes = {std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >}]’
404 | function(function&& __x) noexcept
| ^~~~~~~~
/usr/include/c++/11/bits/std_function.h:404:27: note: no known conversion for argument 1 from ‘std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>’ to ‘std::function<void(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>&&’
404 | function(function&& __x) noexcept
| ~~~~~~~~~~~^~~
/usr/include/c++/11/bits/std_function.h:386:7: note: candidate: ‘std::function<_Res(_ArgTypes ...)>::function(const std::function<_Res(_ArgTypes ...)>&) [with _Res = void; _ArgTypes = {std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >}]’
386 | function(const function& __x)
| ^~~~~~~~
/usr/include/c++/11/bits/std_function.h:386:32: note: no known conversion for argument 1 from ‘std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>’ to ‘const std::function<void(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>&’
386 | function(const function& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/std_function.h:375:7: note: candidate: ‘std::function<_Res(_ArgTypes ...)>::function(std::nullptr_t) [with _Res = void; _ArgTypes = {std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >}; std::nullptr_t = std::nullptr_t]’
375 | function(nullptr_t) noexcept
| ^~~~~~~~
/usr/include/c++/11/bits/std_function.h:375:16: note: no known conversion for argument 1 from ‘std::_Bind<void (StudentNode::*(StudentNode*, int))(std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >)>’ to ‘std::nullptr_t’
375 | function(nullptr_t) noexcept
| ^~~~~~~~~
/usr/include/c++/11/bits/std_function.h:368:7: note: candidate: ‘std::function<_Res(_ArgTypes ...)>::function() [with _Res = void; _ArgTypes = {std::shared_ptr<std_msgs::msg::Float32MultiArray_<std::allocator<void> > >}]’
368 | function() noexcept
| ^~~~~~~~
/usr/include/c++/11/bits/std_function.h:368:7: note: candidate expects 0 arguments, 1 provided
gmake[2]: *** [CMakeFiles/wang_node.dir/build.make:76:CMakeFiles/wang_node.dir/src/wang.cpp.o] 错误 1
gmake[1]: *** [CMakeFiles/Makefile2:137:CMakeFiles/wang_node.dir/all] 错误 2
gmake: *** [Makefile:146:all] 错误 2
---
Failed <<< class [2.95s, exited with code 2]
Summary: 1 package finished [3.13s]
1 package failed: class
1 package had stderr output: class