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 withros2 lifecycle nodes
and the question was also asked for Ubuntu 18.04 LTS on ROS2 CrystalI 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.