How to deliver arguments to a callback function?
Hello All,
I am relatively new user of ROS, and would be grateful if you could answer to my question. I work with Linux and C, and I want to deliver arguments to my callback function. Lets say I want to deliver to it the next struct as a parameter:
typedef struct imageManagmentStruct { IplImage* pSrcIplImage; IplImage* pDstIplImage; GdkPixbuf* pGtkPixbuf; GtkWidget* pGtkImgWindow; int previousImageSize; int left_attach; int right_attach; int top_attach; int bottom_attach; } ImageManagmentStruct; My callback is: void imageCallback ( const sensor_msgs::ImageConstPtr& msg, ImageManagmentStruct* pToImageManagmentStruct ) { // My code. } The call to the callback from the main done like this: ros::Subscriber subLeft = nh.subscribe ("/bb2/left/image_raw", 10, imageCallback, pointerToImageManagmentStruct);
And this is not compiling...
Thank you all, Felix.