Can I have a sensor_msgs::Image::ConstPtr as data member?
I have a class that gets an sensor_msgs::Image::ConstPtr and there are a lot of member functions acting to this same image.
void extractData(const sensor_msgs::Image::ConstPtr &image)
I was wondering if it is possible to have a data member instead of sending the pointer from one function to the other.
I've tried adding:
sensor_msgs::Image::ConstPtr ℑ
But it says uninitialized reference member. Tried also removing Const or Ptr in declaration with no success. Any ideas?
FYI: For some reason the text appears to me as "sensor_msgs::Image::ConstPtr ℑ", when the OP actually entered "sensor_msgs::Image::ConstPtr &image"
Seems fixed now.