ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I'm not sure, if it can work like this. The extra parameter is usually for callbacks that are member functions.
What you want is to use boost::bind.
Your subscriber call should look like this:
ros::Subscriber subLeft = nh.subscribe ("/bb2/left/image_raw", 10,
boost::bind(imageCallback, _1, pointerToImageManagmentStruct) );
(untested, but the call should be similar to this)
2 | No.2 Revision |
I'm not sure, if it can work like this. The extra parameter is usually for callbacks that are member functions.
What you want is to use boost::bind.
Your subscriber call should look like this:
ros::Subscriber subLeft = nh.subscribe nh.subscribe<sensor_msgs::Image> ("/bb2/left/image_raw", 10,
boost::bind(imageCallback, _1, pointerToImageManagmentStruct) );
(untested, but the call should be similar to this)