0
$\begingroup$

Rosanswers logo

Hi,

I am currently working with ROS2 Galactic on Ubuntu 20.04.3 LTS (Focal Fossa) on a project of mine.

The problem:

After stopping my launch file and shutting down my computer, the next time I open my computer, the topics are still being published on the respective topics. As far as my understanding of ROS2 goes, topics should only go up after registering the topics in a node and nodes are killed whenever the process in stopped. I never start up the nodes myself, however, when I type ros2 topic list the nodes already exist. Inspecting one tof he topics using ros2 topic echo /pointcloud show me the messages being published, so a process is running it.

Question

How do I kill these 'magic' nodes? Or at least prevent them from appearing at startup of my laptop?

What I already tried to do:

  • I tried looking up how to manually force kill nodes, which led me to this post which guided me to node lifecycles. There it states that using the ros2 lifecycle command to manage states for each node. However, nothing is showing up with ros2 lifecycle nodes and the question was also asked for Ubuntu 18.04 LTS on ROS2 Crystal

  • I tried to start the launch file again but then I get duplicate nodes: 1 'magic nodes' and 1 node that I am able to stop. The magic nodes stay alive even after forcefully shutting down my laptop.

  • I also tried to kill all the processes on my laptop using suggestions from superuser.com

However, none of these things have worked, so any help is very much appreciated!


Originally posted by Brulf on ROS Answers with karma: 13 on 2021-09-28

Post score: 1


Original comments

Comment by gvdhoorn on 2021-09-28:
There are DDS tools for this, but a quick check with Wireshark should show you where the DDS traffic is coming from. If that's not an IP associated with your machine, it would be a host on your network, as @jeremya suggests.

Unless you've setup something like a systemd job, have added something to the auto-start programs, or have a Docker container that was started with --restart always, ROS 2 nodes do not start up by themselves.

And just to make sure: "shutting down" does actually mean: shutting down and powering off, right? Wouldn't be the first time someone describes putting their laptop to sleep / standby or hibernate/suspend as "shutting down my pc".

Comment by Brulf on 2021-09-28:
A quick update: The problem seems to have fixed itself. However, I was not in time to try out @gvdhoorn or @jeremya 's suggestions, since I just left it alone since I was really frustrated about it. I am working together with multiple people on this project and we are testing all the time and are sharing the same network. So it could very well be the case that it is another host on the network. If I encounter the problem again tomorrow I will keep you updated. So far thank you for all the suggestions

Comment by Alexander on 2022-07-12:
I only have one machine on my network. I have just discovered that after I kill all my nodes some of them are still alive. Logging out and back in does not clear everything. Had to reboot.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Is another machine running ROS2 on your network? You might want to try disconnecting your computer from the network and seeing if you still have traffic.

If it is other ROS2 nodes on your network, you can use export ROS_DOMAIN_ID=1 or some other domain ID other than the default of zero.


Originally posted by jeremya with karma: 275 on 2021-09-28

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Brulf on 2021-09-29:
This was indeed the case. Someone else was publishing the exact same topics hence the 'magic' topics. Thank you for helping @gvdhoorn and @jeremya

Comment by gvdhoorn on 2021-09-29:
Not sure whether it helps avoid discovery traffic, but you could try to set ROS_LOCALHOST_ONLY (#q333687). Alternatively, some RMWs support whitelisting of specific interfaces.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.