I've been working on a simulation with swarm robots using action client and messages, where I had to implement Boost::bind() in a action client. Now I'm stuck on a error where I have no clue how to even debug using the log file. Any advices?

asked 2023-01-05 05:17:05 -0600

JKRoopan gravatar image

In file included from /usr/include/boost/function/detail/maybe_include.hpp:22, from /usr/include/boost/function/detail/function_iterate.hpp:14, from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:53, from /usr/include/boost/function.hpp:71, from /opt/ros/noetic/include/ros/forwards.h:40, from /opt/ros/noetic/include/ros/common.h:37, from /opt/ros/noetic/include/ros/ros.h:43, from /home/jkr/projects/Swarm_Simulation/src/swarm_simulation/src/client.cpp:1: /usr/include/boost/function/function_template.hpp: In instantiation of ‘static void boost::detail::function::function_void_mem_invoker1<memberptr, r,="" t0="">::invoke(boost::detail::function::function_buffer&, T0) [with MemberPtr = void (actionClient::)(std_msgs::Int64_<std::allocator<void> >); R = void; T0 = const boost::shared_ptr<const std_msgs::int64_<std::allocator<void=""> > >&]’: /usr/include/boost/function/function_template.hpp:931:38: required from ‘void boost::function1<r, t1="">::assign_to(Functor) [with Functor = void (actionClient::)(std_msgs::Int64_<std::allocator<void> >); R = void; T0 = const boost::shared_ptr<const std_msgs::int64_<std::allocator<void=""> > >&]’ /usr/include/boost/function/function_template.hpp:720:7: required from ‘boost::function1<r, t1="">::function1(Functor, typename boost::enable_if_<(! boost::is_integral<functor>::value), int>::type) [with Functor = void (actionClient::)(std_msgs::Int64_<std::allocator<void> >); R = void; T0 = const boost::shared_ptr<const std_msgs::int64_<std::allocator<void=""> > >&; typename boost::enable_if_<(! boost::is_integral<functor>::value), int>::type = int]’ /usr/include/boost/function/function_template.hpp:1068:16: required from ‘boost::function<r(t0)&gt;::function(functor, typename="" boost::enable_if_&lt;(!="" boost::is_integral<functor="">::value), int>::type) [with Functor = void (actionClient::)(std_msgs::Int64_<std::allocator<void> >); R = void; T0 = const boost::shared_ptr<const std_msgs::int64_<std::allocator<void=""> > >&; typename boost::enable_if_<(! boost::is_integral<functor>::value), int>::type = int]’ /home/jkr/projects/Swarm_Simulation/src/swarm_simulation/src/client.cpp:52:81: required from here /usr/include/boost/function/function_template.hpp:230:11: error: no match for call to ‘(boost::_mfi::mf1<void, actionclient,="" std_msgs::int64_<std::allocator<void=""> > >) (const boost::shared_ptr<const std_msgs::int64_<std::allocator<void=""> > >&)’ 230 | BOOST_FUNCTION_RETURN(boost::mem_fn(f)(BOOST_FUNCTION_ARGS)); | ^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/boost/bind/mem_fn.hpp:215, from /usr/include/boost/mem_fn.hpp:22, from /usr/include/boost/function/detail/prologue.hpp:18, from /usr/include/boost/function.hpp:30, from /opt/ros/noetic/include/ros/forwards.h:40, from /opt/ros/noetic/include/ros/common.h:37, from /opt/ros/noetic/include/ros/ros.h:43, from /home/jkr/projects/Swarm_Simulation/src/swarm_simulation/src/client.cpp:1: /usr/include/boost/bind/mem_fn_template.hpp:163:7: note: candidate: ‘R boost::_mfi::mf1<r, t,="" a1="">::operator()(T, A1) const [with R = void; T = actionClient; A1 = std_msgs::Int64_<std::allocator<void> >]’ 163 | R operator()(T * p, A1 a1) const | ^~~~~~~~ /usr/include/boost/bind/mem_fn_template.hpp:163:7: note: candidate expects 2 arguments, 1 provided /usr/include/boost/bind/mem_fn_template.hpp:168:25: note: candidate: ‘template<class u=""> R boost::_mfi::mf1<r, t,="" a1="">::operator()(U&, A1) const [with U = U; R = void; T = actionClient; A1 = std_msgs::Int64_<std::allocator<void> >]’ 168 | template<class u=""> R operator()(U & u, A1 a1) const | ^~~~~~~~ /usr/include/boost/bind/mem_fn_template.hpp:168:25 ... (more)

edit retag flag offensive close merge delete