Node subscribe error
I've the error with node I tried these both
class DriveControlNode
{
public: DriveControlNode( ros::NodeHandle& node )
{
joy_sub = node.subscribe<sensor_msgs::Joy>("/joy",1000,Joystick_callback);
//joy_sub = node.subscribe<sensor_msgs::Joy>("/joy",1000,boost::bind(&DriveControlNode::Joystick_callback,this,_1));
}
void Joystick_callback(sensor_msgs::Joy::ConstPtr& msg)
{
// some values
}
}
errors are as follows Case 1:
/usr/include/boost/function/function_template.hpp:225:11: error: no match for call to ‘(boost::_mfi::mf1<void, DriveControlNode, boost::shared_ptr<const sensor_msgs::Joy_<std::allocator<void> > >&>) (const boost::shared_ptr<const sensor_msgs::Joy_<std::allocator<void> > >&)’
Case 2:
/usr/include/boost/bind/bind.hpp:313:9: error: no match for call to ‘(boost::_mfi::mf1<void, DriveControlNode, boost::shared_ptr<const sensor_msgs::Joy_<std::allocator<void> > >&>) (DriveControlNode*&, const boost::shared_ptr<const sensor_msgs::Joy_<std::allocator<void> > >&)’
Thanks.