Author: Ken Tossell Date: To: ros-users Subject: Re: [ros-users] NodeHandle.subscribe(...) - callbacks
> Ideally I would like to add an argument to the subCallback method. > For example:
> void chatterCallback(int queue_id, const std_msgs::StringConstPtr& msg)
> With queue_id being an int I defined when subscribing. Could I do that with my own boost::bind(...)? If so, how?
You can create a function binding that includes an identifier. ROS
won't have any knowledge of the extra parameter:
void callback(const Message::ConstPtr& msg, int queue_id) {
...
}