I am confused about how to transfer compressed image.
There are many rostopics for images. For instance, ‘/camera/rgb/image’, ‘/camera/rgb/image_raw’, ‘/camera/rgb/image_raw/compressed’… Is there a manual explaining the differences? How can I know which topic to subscribe to?
I want both RGB and Depth images. What is the fastest way to get both?
Currently, I subscribe to the topics of ‘camera/rgb/image_rect_color’ and ‘/camera/depth/image_raw’ and then use a synchronizer, which is very slow.
I would appreciate any suggestions that can improve the speed.
Thanks a lot!
We are using the official driver from Orbbec so if you want to get more details you can take a look into official documentation on github. Basically, the convention is that
rect suffix means that the image was rectified, hence more suitable for image processing. The difference between
raw and regular images is that regular images are stored in floating point. It reduces one step in the image processing pipeline, but requires more data to be transferred. Images published by Orbbec driver itself aren’t compressed, so you will have to compress them yourself.
I would suggest writing a simple ROS node compressing the images and republishing them. But before jumping into writing the code this repository might be a solution to your problem.
There is also one more way to solve this. Since you want to use both depth and color data you can subscribe to
/camera/depth_registered/points topic. You can try to compress it with this node before sending through wifi. After receiving it on the laptop, you can unwrap pointcloud into color and depth images if you want to process each separately with OpenCV or keep it as it is if you need pointcloud. Unfortunately, there are not many resources about converting pointcloud to images, and the only post I was able to find is here.
One last thing. Since this topic is related to your previous post Data transfer delay when running two ROSbot 2.0 can I close the previous one?
Thank you very much for your reply and please feel free to close the previous post!