Using callbacks with simple action clients
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<void>, F&, A&, int) [with F = boost::_mfi::mf2<void, gotobehavior,="" const="" actionlib::simpleclientgoalstate&,="" const="" boost::shared_ptr<const="" move_base_msgs::movebaseactionresult_<std::allocator<void="">
&>, A = boost::_bi::list2<const actionlib::simpleclientgoalstate&,="" const="" boost::shared_ptr<const="" move_base_msgs::movebaseresult_<std::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::movebaseresult_<std::allocator<void=""> , R = void, F = boost::_mfi::mf2<void, gotobehavior,="" const="" actionlib::simpleclientgoalstate&,="" const="" boost::shared_ptr<const="" move_base_msgs::movebaseactionresult_<std::allocator<void=""> &>, L = boost::_bi::list3<boost::_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::movebaseactionresult_<std::allocator<void=""> &>, boost::_bi::list3<boost::_bi::value<gotobehavior*>, boost::arg<1>, boost::arg<2> > >, R = void, T0 = const actionlib::SimpleClientGoalState&, T1 = const boost::shared_ptr<const move_base_msgs::movebaseresult_<std::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::movebaseactionresult_<std::allocator<void=""> &>, boost::_bi::list3<boost::_bi::value<gotobehavior*>, boost::arg<1>, boost::arg<2> > >, R = void, T0 = const actionlib::SimpleClientGoalState&, T1 = const boost::shared_ptr<const ...
Please format the error message properly. It will make it much more easier to read.
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?