C++ problem: using function
void imageCallback(const sensor_msgs::ImageConstPtr& msg) { //Programme }
int main(int argc, char **argv) { image_transport::Subscriber sub = it.subscribe("/camera/image_color", 1, imageCallback); image_transport::Subscriber sub_depth = it.subscribe("/camera/depth/image", 1, imageCallback); } The imageCallback subscriber to the camera; I have two cameras.
The question is how can I use imageCallback in the two differents subscribes, because in that way it doesn't work, I got the two camera's image in the same window = like Toggle images !!?