ROS2 nodes launched with systemd aren't discovered
I have a pair of executables on the same machine communicating over ros2 foxy that are launched by systemd. When systemd starts the services, the nodes from each process don't find each other and can't communicate. The cli tools also can't detect any nodes or topics. There are no errors logged.
If I start the same executables on my own, everything works.
e.g.
$ systemctl start my_service.service // calls ros2 launch my_package main.launch.py
$ ros2 topic list
/parameter_events
/rosout
$ systemctl stop my_service.service
$ ros2 launch my_package main.launch.py
$ ros2 topic list
// all the topics are shown
Hi @chrissmith I found this discussion on the topic: https://githubmemory.com/repo/ros2/rm...
To highlight some of the issues:
Discovery Server, in order to reduce traffic network, avoids to send topic information to entities that "do not need it". In practice, what we are seeing here is that the Daemon has been configured as a CLIENT without user endpoints. Thus, this participant (daemon node) will receive information from shared topics (such as /parameter_events and /rosout), but it will not discover /chatter as it has no endpoints that publish or subscribe to it.
Please take a look as this may help you. However someone more experienced than myself on the subject will be required to document an answer.