ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROS2 nodes launched with systemd aren't discovered

asked 2021-10-28 12:03:39 -0500

chrissmith gravatar image

updated 2021-10-29 13:24:31 -0500

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
edit retag flag offensive close merge delete

Comments

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.

osilva gravatar image osilva  ( 2021-10-28 20:11:45 -0500 )edit

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.

osilva gravatar image osilva  ( 2021-10-28 20:13:06 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-10-29 13:22:50 -0500

chrissmith gravatar image

I believe the issue is this https://github.com/eProsima/Fast-DDS/.... Adding the XML config partially solves my issue.

Unfortunately one of the processes (using rclnodejs) is still unable to receive any data from the other (using rclcpp). ros2 topic echo displays the data being published correctly. Strangely, although rclnodejs never receives the data, ros2 topic info reports the node as a subscriber on the topic so it should be.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-10-28 10:25:26 -0500

Seen: 382 times

Last updated: Oct 29 '21