Looks like you need to use this overload:
Subscriber image_transport::ImageTransport::subscribe(
const std::string & base_topic,
uint32_t queue_size,
const boost::function<void(const sensor_msgs::ImageConstPtr &)>& callback,
const ros::VoidPtr & tracked_object = ros::VoidPtr(),
const TransportHints & transport_hints = TransportHints()
)
So I'd assume you just need to explicitely pass the tracked_object parameter:
image_transport::Subscriber sub = it.subscribe(
"/camera1/RGB",
1,
boost::bind(imageCallback, _1, 1),
ros::VoidPtr(), // THIS ADDED
image_transport::TransportHints::TransportHints("compressed")
);
(You might very well be able to just pass nullptr
or NULL
or 0
instead. I have no experience with the libraries shown here.)