actionlib callback based SimpleActionClient bind error

asked 2016-01-29 08:27:21 -0600

bailiqun gravatar image

updated 2016-01-29 09:54:15 -0600

I got compile error use in simpleActionClient to send movebase goal, part of code is

void ac_activeCb()
{
    std::cout<<"active"<<std::endl;
}

void ac_doneCb(const actionlib::SimpleClientGoalState& state,
                            const move_base_msgs::MoveBaseResult::ConstPtr& result)
{

}

void ac_feedbackCb(const move_base_msgs::MoveBaseFeedback::ConstPtr& feedback)
{

}

moveac->sendGoal(goal,
     boost::bind(ac_doneCb, this, _1, _2),
     MoveBaseClient::SimpleActiveCallback(),
     boost::bind(ac_feedbackCb, this, _1)
);

this is error compile

/usr/include/boost/bind/bind.hpp:69: error: 'void (*)(const actionlib::SimpleClientGoalState&, const boost::shared_ptr<const move_base_msgs::MoveBaseResult_<std::allocator<void> > >&)' is not a class, struct, or union type  typedef typename F::result_type type;
                                     ^
edit retag flag offensive close merge delete