Internal ROS errors: BOOST, deduction failure
I'm currently building a ROS Behavior Tree controlling unit, using the library ROS-Behavior-Tree. But I'm still very new to C++ and ROS, and I have no clue what this error message tries to tell me:
In file included from /usr/include/boost/function/detail/maybe_include.hpp:18:0,
from /usr/include/boost/function/detail/function_iterate.hpp:14,
from /usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:52,
from /usr/include/boost/function.hpp:64,
from /opt/ros/melodic/include/ros/forwards.h:40,
from /opt/ros/melodic/include/ros/common.h:37,
from /opt/ros/melodic/include/ros/ros.h:43,
from /home/username/catkin_ws/src/behavior_trees/src/tree/Tree.cpp:1:
/usr/include/boost/function/function_template.hpp: In instantiation of ‘static void boost::detail::function::void_function_obj_invoker1<FunctionObj, R, T0>::invoke(boost::detail::function::function_buffer&, T0) [with FunctionObj = std::_Bind<void (BTAction::*(BTAction*, boost::arg<1>))(const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&)>; R = void; T0 = const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&]’:
/usr/include/boost/function/function_template.hpp:925:38: required from ‘void boost::function1<R, T1>::assign_to(Functor) [with Functor = std::_Bind<void (BTAction::*(BTAction*, boost::arg<1>))(const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&)>; R = void; T0 = const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&]’
/usr/include/boost/function/function_template.hpp:716:7: required from ‘boost::function1<R, T1>::function1(Functor, typename boost::enable_if_c<(! boost::is_integral<Functor>::value), int>::type) [with Functor = std::_Bind<void (BTAction::*(BTAction*, boost::arg<1>))(const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&)>; R = void; T0 = const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&; typename boost::enable_if_c<(! boost::is_integral<Functor>::value), int>::type = int]’
/usr/include/boost/function/function_template.hpp:1061:16: required from ‘boost::function<R(T0)>::function(Functor, typename boost::enable_if_c<(! boost::is_integral<Functor>::value), int>::type) [with Functor = std::_Bind<void (BTAction::*(BTAction*, boost::arg<1>))(const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&)>; R = void; T0 = const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&; typename boost::enable_if_c<(! boost::is_integral<Functor>::value), int>::type = int]’
/home/username/catkin_ws/src/behavior_trees/include/nodes/actionNode.h:32:26: required from here
/usr/include/boost/function/function_template.hpp:159:11: error: no match for call to ‘(std::_Bind<void (BTAction::*(BTAction*, boost::arg<1>))(const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&)>) (const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&)’
BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
^
In file included from /usr/include/boost/smart_ptr/detail/shared_count.hpp:38:0,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:28,
from /usr/include/boost/shared_ptr.hpp:17,
from /opt/ros/melodic/include/ros/forwards.h:37,
from /opt/ros/melodic/include/ros/common.h:37,
from /opt/ros/melodic/include/ros/ros.h:43,
from /home/username/catkin_ws/src/behavior_trees/src/tree/Tree.cpp:1:
/usr/include/c++/7/functional:547:2: note: candidate: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {_Args ...}; _Result = _Result; _Functor = void (BTAction::*)(const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&); _Bound_args = {BTAction*, boost::arg<1>}]
operator()(_Args&&... __args)
^~~~~~~~
/usr/include/c++/7/functional:547:2: note: template argument deduction/substitution failed:
/usr/include/c++/7/functional:558:2: note: candidate: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _Result = _Result; _Functor = void (BTAction::*)(const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&); _Bound_args = {BTAction*, boost::arg<1>}]
operator()(_Args&&... __args) const
^~~~~~~~
/usr/include/c++/7/functional:558:2: note: template argument deduction/substitution failed:
/usr/include/c++/7/functional:576:2: note: candidate: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (BTAction::*)(const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&); _Bound_args = {BTAction*, boost::arg<1>}]
operator()(_Args&&... __args) volatile
^~~~~~~~
/usr/include/c++/7/functional:576:2: note: template argument deduction/substitution failed:
/usr/include/c++/7/functional:588:2: note: candidate: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = void (BTAction::*)(const boost::shared_ptr<const behavior_tree_core::BTGoal_<std::allocator<void> > >&); _Bound_args = {BTAction*, boost::arg<1>}]
operator()(_Args&&... __args) const volatile
^~~~~~~~
/usr/include/c++/7/functional:588:2: note: template argument deduction/substitution failed:
The code is still rather basic, but my problem is that most of the error seems to take place inside ROS and C++, so I don't even know which part of the code to paste here. Any hints are much appreciated!
Asked by totalnewbie on 2018-08-20 12:43:53 UTC
Answers
It looks like you are trying to invoke a templated function with the wrong datatype.
Asked by tfoote on 2018-10-03 05:11:13 UTC
Comments
We don't use
<code>..</code>
here on ROS Answers. Askbot works differently. Please use the Preformatted Text button (the one with101010
on it) to format code and error messages.Asked by gvdhoorn on 2018-08-20 13:28:38 UTC
Additionally: can you please tell us whether you've resolved #q300751?
Asked by gvdhoorn on 2018-08-20 13:29:29 UTC