Hi everyone!
I am trying to use a goal callback and a feedback callback with my move base action client. I am getting a really long and hard to understand error though. I was hoping someone might be able to help me decipher it.
Here is a snippet of the code:
void GoToBehavior::goalCallback(const actionlib::SimpleClientGoalState& state,
const move_base_msgs::MoveBaseActionResult::ConstPtr& result) {
if(state == actionlib::SimpleClientGoalState::SUCCEEDED)
ROS_INFO("Goal reached!");
else
ROS_INFO("Goal failed");
}
void GoToBehavior::feebackCallback(const move_base_msgs::MoveBaseActionFeedback::ConstPtr& feedback){
}
void GoToBehavior::execute(){
ROS_INFO("Sending goal");
ac->sendGoal(goalMsg,
boost::bind(&GoToBehavior::goalCallback, this, _1, _2),
MoveBaseClient::SimpleActiveCallback(),
boost::bind(&GoToBehavior::feebackCallback, this, _1));
}
where ac is of type: actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction>
The error I am getting is this:
In file included from /usr/include/boost/bind.hpp:22:0, from /opt/ros/hydro/include/ros/publisher.h:35, from /opt/ros/hydro/include/ros/node_handle.h:32, from /opt/ros/hydro/include/ros/ros.h:45, from /home/nick/mqp_ws/src/mqp/hulk/include/hulk/Behavior.h:5, from /home/nick/mqp_ws/src/mqp/hulk/include/hulk/GoToBehavior.h:5, from /home/nick/mqp_ws/src/mqp/hulk/src/GoToBehavior.cpp:1: /usr/include/boost/bind/bind.hpp: In member function ‘void boost::_bi::list3<A1, A2, A3>::operator()(boost::_bi::type, F&, A&, int) [with F = boost::mfi::mf2<void, GoToBehavior, const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void
&>, A = boost::bi::list2<const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseResultstd::allocator<void &>, A1 = boost::_bi::value<GoToBehavior*>, A2 = boost::arg<1>, A3 = boost::arg<2>]’: /usr/include/boost/bind/bind_template.hpp:102:59: instantiated from ‘boost::_bi::bind_t<R, F, L>::result_type boost::bi::bind_t<R, F, L>::operator()(const A1&, const A2&) [with A1 = actionlib::SimpleClientGoalState, A2 = boost::shared_ptr<const move_base_msgs::MoveBaseResultstd::allocator<void , R = void, F = boost::mfi::mf2<void, GoToBehavior, const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &>, L = boost::_bi::list3boost::_bi::value<GoToBehavior*, boost::arg<1>, boost::arg<2> >, boost::_bi::bind_t<R, F, L>::result_type = void]’ /usr/include/boost/function/function_template.hpp:153:11: instantiated from ‘static void boost::detail::function::void_function_obj_invoker2<FunctionObj, R, T0, T1>::invoke(boost::detail::function::function_buffer&, T0, T1) [with FunctionObj = boost::_bi::bind_t<void, boost::mfi::mf2<void, GoToBehavior, const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &>, boost::bi::list3boost::_bi::value<GoToBehavior*, boost::arg<1>, boost::arg<2> > >, R = void, T0 = const actionlib::SimpleClientGoalState&, T1 = const boost::shared_ptr<const move_base_msgs::MoveBaseResultstd::allocator<void &]’ /usr/include/boost/function/function_template.hpp:913:60: instantiated from ‘void boost::function2<R, T1, T2>::assign_to(Functor) [with Functor = boost::bi::bind_t<void, boost::mfi::mf2<void, GoToBehavior, const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &>, boost::bi::list3boost::_bi::value<GoToBehavior*, boost::arg<1>, boost::arg<2> > >, R = void, T0 = const actionlib::SimpleClientGoalState&, T1 = const boost::shared_ptr<const move_base_msgs::MoveBaseResultstd::allocator<void &]’ /usr/include/boost/function/function_template.hpp:722:7: instantiated from ‘boost::function2<R, T1, T2>::function2(Functor, typename boost::enable_if_cboost::type_traits::ice_not<boost::is_integral<Functor::value>::value, int>::type) [with Functor = boost::bi::bind_t<void, boost::mfi::mf2<void, GoToBehavior, const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &>, boost::bi::list3boost::_bi::value<GoToBehavior*, boost::arg<1>, boost::arg<2> > >, R = void, T0 = const actionlib::SimpleClientGoalState&, T1 = const boost::shared_ptr<const move_base_msgs::MoveBaseResultstd::allocator<void &, typename boost::enable_if_cboost::type_traits::ice_not<boost::is_integral<Functor::value>::value, int>::type = int]’ /usr/include/boost/function/function_template.hpp:1064:16: instantiated from ‘boost::function<R(T0, T1)>::function(Functor, typename boost::enable_if_cboost::type_traits::ice_not<boost::is_integral<Functor::value>::value, int>::type) [with Functor = boost::bi::bind_t<void, boost::mfi::mf2<void, GoToBehavior, const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &>, boost::bi::list3boost::_bi::value<GoToBehavior*, boost::arg<1>, boost::arg<2> > >, R = void, T0 = const actionlib::SimpleClientGoalState&, T1 = const boost::shared_ptr<const move_base_msgs::MoveBaseResultstd::allocator<void &, typename boost::enable_if_cboost::type_traits::ice_not<boost::is_integral<Functor::value>::value, int>::type = int]’ /home/nick/mqp_ws/src/mqp/hulk/src/GoToBehavior.cpp:37:70: instantiated from here /usr/include/boost/bind/bind.hpp:392:9: error: no match for call to ‘(boost::mfi::mf2<void, GoToBehavior, const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &>) (GoToBehavior*&, const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseResultstd::allocator<void &)’ /usr/include/boost/bind/mem_fn_template.hpp:253:75: note: candidates are: /usr/include/boost/bind/mem_fn_template.hpp:278:7: note: R boost::mfi::mf2<R, T, A1, A2>::operator()(T*, A1, A2) const [with R = void, T = GoToBehavior, A1 = const actionlib::SimpleClientGoalState&, A2 = const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &] /usr/include/boost/bind/mem_fn_template.hpp:278:7: note: no known conversion for argument 3 from ‘const boost::shared_ptr<const move_base_msgs::MoveBaseResultstd::allocator<void ’ to ‘const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &’ /usr/include/boost/bind/mem_fn_template.hpp:283:25: note: template R boost::mfi::mf2::operator()(U&, A1, A2) const [with U = U, R = void, T = GoToBehavior, A1 = const actionlib::SimpleClientGoalState&, A2 = const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &] /usr/include/boost/bind/mem_fn_template.hpp:291:25: note: template R boost::mfi::mf2::operator()(const U&, A1, A2) const [with U = U, R = void, T = GoToBehavior, A1 = const actionlib::SimpleClientGoalState&, A2 = const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &] /usr/include/boost/bind/mem_fn_template.hpp:299:7: note: R boost::mfi::mf2<R, T, A1, A2>::operator()(T&, A1, A2) const [with R = void, T = GoToBehavior, A1 = const actionlib::SimpleClientGoalState&, A2 = const boost::shared_ptr<const move_base_msgs::MoveBaseActionResultstd::allocator<void &] /usr/include/boost/bind/mem_fn_template.hpp:299:7: note: no known conversion for argument 1 from ‘GoToBehavior*’ to ‘GoToBehavior&’ /usr/include/boost/bind/bind.hpp: In member function ‘void boost::_bi::list2<A1, A2>::operator()(boost::_bi::type, F&, A&, int) [with F = boost::mfi::mf1<void, GoToBehavior, const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &>, A = boost::bi::list1<const boost::shared_ptr<const move_base_msgs::MoveBaseFeedbackstd::allocator<void &>, A1 = boost::_bi::value<GoToBehavior*>, A2 = boost::arg<1>]’: /usr/include/boost/bind/bind_template.hpp:47:59: instantiated from ‘boost::_bi::bind_t<R, F, L>::result_type boost::bi::bind_t<R, F, L>::operator()(const A1&) [with A1 = boost::shared_ptr<const move_base_msgs::MoveBaseFeedbackstd::allocator<void , R = void, F = boost::mfi::mf1<void, GoToBehavior, const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &>, L = boost::_bi::list2boost::_bi::value<GoToBehavior*, boost::arg<1> >, boost::_bi::bind_t<R, F, L>::result_type = void]’ /usr/include/boost/function/function_template.hpp:153:11: instantiated from ‘static void boost::detail::function::void_function_obj_invoker1<FunctionObj, R, T0>::invoke(boost::detail::function::function_buffer&, T0) [with FunctionObj = boost::_bi::bind_t<void, boost::mfi::mf1<void, GoToBehavior, const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &>, boost::bi::list2boost::_bi::value<GoToBehavior*, boost::arg<1> > >, R = void, T0 = const boost::shared_ptr<const move_base_msgs::MoveBaseFeedbackstd::allocator<void &]’ /usr/include/boost/function/function_template.hpp:913:60: instantiated from ‘void boost::function1<R, T1>::assign_to(Functor) [with Functor = boost::bi::bind_t<void, boost::mfi::mf1<void, GoToBehavior, const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &>, boost::bi::list2boost::_bi::value<GoToBehavior*, boost::arg<1> > >, R = void, T0 = const boost::shared_ptr<const move_base_msgs::MoveBaseFeedbackstd::allocator<void &]’ /usr/include/boost/function/function_template.hpp:722:7: instantiated from ‘boost::function1<R, T1>::function1(Functor, typename boost::enable_if_cboost::type_traits::ice_not<boost::is_integral<Functor::value>::value, int>::type) [with Functor = boost::bi::bind_t<void, boost::mfi::mf1<void, GoToBehavior, const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &>, boost::bi::list2boost::_bi::value<GoToBehavior*, boost::arg<1> > >, R = void, T0 = const boost::shared_ptr<const move_base_msgs::MoveBaseFeedbackstd::allocator<void &, typename boost::enable_if_cboost::type_traits::ice_not<boost::is_integral<Functor::value>::value, int>::type = int]’ /usr/include/boost/function/function_template.hpp:1064:16: instantiated from ‘boost::function<R(T0)>::function(Functor, typename boost::enable_if_cboost::type_traits::ice_not<boost::is_integral<Functor::value>::value, int>::type) [with Functor = boost::bi::bind_t<void, boost::mfi::mf1<void, GoToBehavior, const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &>, boost::bi::list2boost::_bi::value<GoToBehavior*, boost::arg<1> > >, R = void, T0 = const boost::shared_ptr<const move_base_msgs::MoveBaseFeedbackstd::allocator<void &, typename boost::enable_if_cboost::type_traits::ice_not<boost::is_integral<Functor::value>::value, int>::type = int]’ /home/nick/mqp_ws/src/mqp/hulk/src/GoToBehavior.cpp:37:70: instantiated from here /usr/include/boost/bind/bind.hpp:313:9: error: no match for call to ‘(boost::mfi::mf1<void, GoToBehavior, const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &>) (GoToBehavior*&, const boost::shared_ptr<const move_base_msgs::MoveBaseFeedbackstd::allocator<void &)’ /usr/include/boost/bind/mem_fn_template.hpp:136:65: note: candidates are: /usr/include/boost/bind/mem_fn_template.hpp:163:7: note: R boost::mfi::mf1<R, T, A1>::operator()(T*, A1) const [with R = void, T = GoToBehavior, A1 = const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &] /usr/include/boost/bind/mem_fn_template.hpp:163:7: note: no known conversion for argument 2 from ‘const boost::shared_ptr<const move_base_msgs::MoveBaseFeedbackstd::allocator<void ’ to ‘const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &’ /usr/include/boost/bind/mem_fn_template.hpp:168:25: note: template R boost::mfi::mf1::operator()(U&, A1) const [with U = U, R = void, T = GoToBehavior, A1 = const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &] /usr/include/boost/bind/mem_fn_template.hpp:176:25: note: template R boost::mfi::mf1::operator()(const U&, A1) const [with U = U, R = void, T = GoToBehavior, A1 = const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &] /usr/include/boost/bind/mem_fn_template.hpp:184:7: note: R boost::mfi::mf1<R, T, A1>::operator()(T&, A1) const [with R = void, T = GoToBehavior, A1 = const boost::shared_ptr<const move_base_msgs::MoveBaseActionFeedbackstd::allocator<void &] /usr/include/boost/bind/mem_fn_template.hpp:184:7: note: no known conversion for argument 1 from ‘GoToBehavior*’ to ‘GoToBehavior&’
Any help would be greatly appreciated!
Originally posted by Robocop87 on ROS Answers with karma: 255 on 2015-02-03
Post score: 0
Original comments
Comment by BennyRe on 2015-02-03:
Please format the error message properly. It will make it much more easier to read.
Comment by Robocop87 on 2015-02-03:
I'm sorry for not formatting it correctly, I thought I just needed to put it in the quote box. What should I have done?