ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Instead of setting the parameter ~image_transport:=compressed it's also possible to set the value hardcoded with a TransportHints object:
ros::NodeHandle nh;
image_transport::ImageTransport it(nh);
image_transport::TransportHints hints("compressed");
it.subscribe(base_topic, queue_size, callback, ros::VoidPtr(), hints);
Another solution is to implement the subscriber without image_transport and subscribe to the compressed image directly, as shown in https://answers.ros.org/question/230476/how-to-subscribe-to-sensor_msgscompressedimage-without-the-raw-image/