ROS2 node see each other some times to times

asked 2020-05-26 10:41:17 -0500

maxime gravatar image

updated 2020-05-29 06:57:52 -0500

Using Eloquent & Fast_RTPS.

I have a subscriber running in a docker container, D_Sub.

I have a publisher running in a docker container D_Pub.

At first, when launched more or less at the same time, D_Sub is receiving what D_Pub send. It always works the first time.

Don't relaunch or turn off D_Sub. Only D_Pub is relaunched.

If I relaunch D_Pub it works again i.e D_Sub is receiving what D_Pub send.

If I relaunch D_Pub one more time it works again.

If I relaunch D_Pub any time more it doesn't works i.e D_Sub does NOT receive what D_Pub send.

Sometimes it works 3 times, some times 2 ... Why is that ? Note that it is in a local network so there is no data loss or connectivity problem.

You can test it with :

docker run -it --rm osrf/ros:eloquent-desktop ros2 run demo_nodes_cpp talker

and

docker run -it --rm osrf/ros:eloquent-desktop ros2 run demo_nodes_cpp listener

edit retag flag offensive close merge delete