Robotics StackExchange | Archived questions

Images messages not transmitted over network

Hello,

I have a RealSense camera that publishes a color stream at 15fps, size of 640x360 in the topic /color/image_raw. The image messages are published correctly on my robot (can see messages in ros2 topic echoand ros2 topic hzgives about 15Hz)

However, on a remote machine, I can't receives the Image messages:

I use CycloneDDS on ROS2 Galactic.

Why are Image message not transmitted between the two computers ? How to solve that ?

edit: seems related to DDS issue: following https://docs.ros.org/en/galactic/How-To-Guides/DDS-tuning.html on my remote machine I could get the callback called when palying rosbag of camera data. Without this tuning, even if rosbag play and subscriber are on the same machine, no message are passed.

Asked by PatoInso on 2022-10-11 10:36:59 UTC

Comments

Hello! We have a very similar setup, and we are having the same problems, but with a lidar point cloud. Did you have any luck solving the issue? Thanks!

Asked by Olivier_Gamache on 2023-01-10 11:19:10 UTC

Nope, we still have the problem... however we could improve a bit (cf my edit) by tweaking the DDS config related to socket size, and by reducing a bien the image resolution, but still no transmission over Wifi. Maybe try some options from here ? (https://github.com/eclipse-cyclonedds/cyclonedds/blob/master/docs/manual/options.md)

Asked by PatoInso on 2023-01-12 10:21:01 UTC

Any update or solution to this? I've just run into the exact same problem. DDS tuning didn't seem to help either.

Asked by ndmmdn on 2023-06-15 10:25:16 UTC

Hi @ndmmdn! As mentionned in my answer, if you are interested, we developped a tool in our robotics lab to bypass this issue and relay ROS topics using TCP. Our tool is easy to set up and use. Here is the link to our code and documentation: https://github.com/norlab-ulaval/ros2_tcp_tunnel. If you have any question, don't hesitate to ask us!

Asked by Simon-Pierre DeschĂȘnes on 2023-06-15 12:47:33 UTC

Thanks for the suggestion. Theoretically this should be able to be achieved by using DDS QoS profiles, but for some reason its not working. I will try to work the issue further, but will definitely have your repo in mind as a backup!

Asked by ndmmdn on 2023-06-17 05:53:40 UTC

Answers

Hi PatoInso! As pointed out in your edit, this issue is related to the DDS middleware protocol. The problem comes from the fact that the ROS middleware uses UDP, which does not guarantee that sent packets will be received on a remote machine. After multiple failed attempts to change the DDS config to use TCP instead of UDP, our robotics lab developped a tcp tunnel to bypass this issue. It is very intuitive and easy to use. All you have to do is start a server node on the publishing machine and a client node on the subscribing machine and call a service to add the desired topic to the tunnel. The tunnel will then relay this topic using TCP and republish it on the remote machine, allowing you to subscribe to topics with large messages (e.g., images) over an unreliable network. I hope this will help!

Asked by Simon-Pierre DeschĂȘnes on 2023-03-31 19:01:42 UTC

Comments