Robotics StackExchange | Archived questions

Msg is not received in subscriber if publisher is not active before

I have a problem with receiving messages in a subscriber in ROS2. It is a ComposableNode that is started by launch file in a ComposableNodeContainer.

What could be the reason for this?

I am running ROS2 Foxy on Ubuntu 20.04. Environment variables:

ROS_VERSION=2
ROS_PYTHON_VERSION=3
ROS_LOCALHOST_ONLY=0
ROS_DISTRO=foxy

Edit: Some further attempts have now revealed that I can fix the problem by changing the order of the ComposableNodes in the composablenodedescriptions of the launch file. This solved the problem for me. But I can't understand the behavior. From my point of view the order should not matter, right?

Asked by qwertz on 2023-02-10 08:01:13 UTC

Comments

Looking for a solution, I read something here about how problems can occur when there is both inter- and intra-process communication. Could this be the cause of the observed behavior?

Asked by qwertz on 2023-02-13 06:27:22 UTC

Answers