Publishing only Compressed Images only to decrease latency
I am currently using ROS kinetic and haave tried video_stream_opencv and usb_cam packages to publish images from my camera. The problem with these packages are that they publish raw and theora topics as well in addition to compressed image topic. I only want to publish compressed images as I want to send the video stream over wi-fi to a remote location. I get a lot of latency when I am publishing so many extra topics. Is there a way to only publish compressed images?
Can you clarify how you've determined this?
If there are no subscribers, no data is sent over your wireless link.
I run a rqt_image_view from my remote location and see that the video is delayed.
I specifically asked about how you determined you were "publishing so many extra topics".
Again: if there are no subscribers, there is no data transfer.
Using rostopic list. Also on rqt_image_view I can see /image_raw, /theora and /compressed_image options. Selecting any one of them gives me an image feed
Yes, but the availability of topics does not mean there is any actual data transfer.
rqt_image_view
is showing you the "index" or "table of contents". Only after a node has created an actual subscription will actual data be transferred. Before that, nothing is transmitted.You could use a tool like Wireshark to check this.