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
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 A3>::operator()(boost::_bi::type,> F&, A&, int) [with F => boost::_mfi::mf2 const> actionlib::SimpleClientGoalState&,> const boost::shared_ptr move_base_msgs::MoveBaseActionResult_>>>&>, A = boost::_bi::list2 const boost::shared_ptr move_base_msgs::MoveBaseResult_>>>&>, A1 = boost::_bi::value, A2 => boost::arg<1>, A3 = boost::arg<2>]’:
> /usr/include/boost/bind/bind_template.hpp:102:59:> instantiated from>‘boost::_bi::bind_t L>::result_type boost::_bi::bind_t F, L>::operator()(const A1&, const> A2&) [with A1 => actionlib::SimpleClientGoalState, A2 => boost::shared_ptr move_base_msgs::MoveBaseResult_>>>, R = void, F = boost::_mfi::mf2 const> actionlib::SimpleClientGoalState&,> const boost::shared_ptr move_base_msgs::MoveBaseActionResult_>>>&>, L = boost::_bi::list3,> boost::arg<1>, boost::arg<2>>,> boost::_bi::bind_t L>::result_type = void]’
> /usr/include/boost/function/function_template.hpp:153:11:> instantiated from ‘static void
> boost::detail::function::void_function_obj_invoker2 R, T0,> T1>::invoke(boost::detail::function::function_buffer&,> T0, T1) [with FunctionObj => boost::_bi::bind_t boost::_mfi::mf2 const> actionlib::SimpleClientGoalState&,> const boost::shared_ptr move_base_msgs::MoveBaseActionResult_>>>&>, boost::_bi::list3,> boost::arg<1>, boost::arg<2>>>, R => void, T0 = const> actionlib::SimpleClientGoalState&, T1> = const boost::shared_ptr>>>&]’ /usr/include/boost/function/function_template.hpp:913:60:
> instantiated from ‘void
> boost::function2 T2>::assign_to(Functor) [with Functor> = boost::_bi::bind_t const> actionlib::SimpleClientGoalState&,> const boost::shared_ptr move_base_msgs::MoveBaseActionResult_>>>&>, boost::_bi::list3,> boost::arg<1>, boost::arg<2>>>, R => void, T0 = const> actionlib::SimpleClientGoalState&, T1> = const boost::shared_ptr>>>&]’ /usr/include/boost/function/function_template.hpp:722:7:
> instantiated from ‘boost::function2 T1, T2>::function2(Functor, typename> boost::enable_if_c::value>::value,> int>::type) [with Functor => boost::_bi::bind_t boost::_mfi::mf2 const> actionlib::SimpleClientGoalState&,> const boost::shared_ptr move_base_msgs::MoveBaseActionResult_>>>&>, boost::_bi::list3,> boost::arg<1>, boost::arg<2>>>, R => void, T0 = const> actionlib::SimpleClientGoalState&, T1> = const boost::shared_ptr>>>&, typename boost::enable_if_c::value>::value,> int>::type = int]’
> /usr/include/boost/function/function_template.hpp:1064:16:> instantiated from>‘boost::function T1)>::function(Functor, typename> boost::enable_if_c::value>::value,> int>::type) [with Functor => boost::_bi::bind_t boost::_mfi::mf2 const> actionlib::SimpleClientGoalState&,> const boost::shared_ptr move_base_msgs::MoveBaseActionResult_>>>&>, boost::_bi::list3,> boost::arg<1>, boost::arg<2>>>, R => void, T0 = const> actionlib::SimpleClientGoalState&, T1> = const boost::shared_ptr>>>&, typename boost::enable_if_c::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 const> actionlib::SimpleClientGoalState&,> const boost::shared_ptr move_base_msgs::MoveBaseActionResult_>>>&>) (GoToBehavior*&, const actionlib::SimpleClientGoalState&,> const boost::shared_ptr move_base_msgs::MoveBaseResult_>>>&)’ /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 A2>::operator()(T*, A1, A2) const> [with R = void, T = GoToBehavior, A1 => const> actionlib::SimpleClientGoalState&, A2> = const boost::shared_ptr>>>&] /usr/include/boost/bind/mem_fn_template.hpp:278:7:> note: no known conversion for> argument 3 from ‘const
> boost::shared_ptr move_base_msgs::MoveBaseResult_>>>’ to ‘const boost::shared_ptr>>>&’ /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>>>&] /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>>>&] /usr/include/boost/bind/mem_fn_template.hpp:299:7:> note: R boost::_mfi::mf2 A2>::operator()(T&, A1, A2) const> [with R = void, T = GoToBehavior, A1 => const> actionlib::SimpleClientGoalState&, A2> = const boost::shared_ptr>>>&] /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 A2>::operator()(boost::_bi::type,> F&, A&, int) [with F => boost::_mfi::mf1 const boost::shared_ptr move_base_msgs::MoveBaseActionFeedback_>>>&>, A = boost::_bi::list1 move_base_msgs::MoveBaseFeedback_>>>&>, A1 = boost::_bi::value, A2 => boost::arg<1>]’:
> /usr/include/boost/bind/bind_template.hpp:47:59:> instantiated from>‘boost::_bi::bind_t L>::result_type boost::_bi::bind_t F, L>::operator()(const A1&) [with A1> = boost::shared_ptr>>>, R = void, F = boost::_mfi::mf1 const boost::shared_ptr move_base_msgs::MoveBaseActionFeedback_>>>&>, L = boost::_bi::list2,> boost::arg<1>>, boost::_bi::bind_t 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 R,> T0>::invoke(boost::detail::function::function_buffer&,> T0) [with FunctionObj => boost::_bi::bind_t boost::_mfi::mf1 const boost::shared_ptr move_base_msgs::MoveBaseActionFeedback_>>>&>, boost::_bi::list2,> boost::arg<1>>>, R = void, T0 => const boost::shared_ptr move_base_msgs::MoveBaseFeedback_>>>&]’ /usr/include/boost/function/function_template.hpp:913:60:
> instantiated from ‘void
> boost::function1 T1>::assign_to(Functor) [with Functor> = boost::_bi::bind_t const boost::shared_ptr move_base_msgs::MoveBaseActionFeedback_>>>&>, boost::_bi::list2,> boost::arg<1>>>, R = void, T0 => const boost::shared_ptr move_base_msgs::MoveBaseFeedback_>>>&]’ /usr/include/boost/function/function_template.hpp:722:7:
> instantiated from ‘boost::function1 T1>::function1(Functor, typename> boost::enable_if_c::value>::value,> int>::type) [with Functor => boost::_bi::bind_t boost::_mfi::mf1 const boost::shared_ptr move_base_msgs::MoveBaseActionFeedback_>>>&>, boost::_bi::list2,> boost::arg<1>>>, R = void, T0 => const boost::shared_ptr move_base_msgs::MoveBaseFeedback_>>>&, typename boost::enable_if_c::value>::value,> int>::type = int]’
> /usr/include/boost/function/function_template.hpp:1064:16:> instantiated from>‘boost::function::function(Functor,> typename> boost::enable_if_c::value>::value,> int>::type) [with Functor => boost::_bi::bind_t boost::_mfi::mf1 const boost::shared_ptr move_base_msgs::MoveBaseActionFeedback_>>>&>, boost::_bi::list2,> boost::arg<1>>>, R = void, T0 => const boost::shared_ptr move_base_msgs::MoveBaseFeedback_>>>&, typename boost::enable_if_c::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 const boost::shared_ptr move_base_msgs::MoveBaseActionFeedback_>>>&>) (GoToBehavior*&, const boost::shared_ptr move_base_msgs::MoveBaseFeedback_>>>&)’ /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 A1>::operator()(T*, A1) const [with R> = void, T = GoToBehavior, A1 = const boost::shared_ptr move_base_msgs::MoveBaseActionFeedback_>>>&] /usr/include/boost/bind/mem_fn_template.hpp:163:7:> note: no known conversion for> argument 2 from ‘const
> boost::shared_ptr move_base_msgs::MoveBaseFeedback_>>>’ to ‘const boost::shared_ptr>>>&’ /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 move_base_msgs::MoveBaseActionFeedback_>>>&] /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 move_base_msgs::MoveBaseActionFeedback_>>>&] /usr/include/boost/bind/mem_fn_template.hpp:184:7:> note: R boost::_mfi::mf1 A1>::operator()(T&, A1) const [with R> = void, T = GoToBehavior, A1 = const boost::shared_ptr move_base_msgs::MoveBaseActionFeedback_>>>&] /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!
↧