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

ROS2 (Foxy) commands stopped working

asked 2022-05-10 06:09:10 -0600

harun-loodos gravatar image

updated 2022-05-18 06:48:06 -0600


After a clean Ubuntu 20.04 installation, I had installed both Foxy and Noetic. There was no error or anything unusual while installing.

I followed MoveIt2 tutorials to do some experiments using Rviz and MoveIt2. But when I run the demo tutorial with the command below:

ros2 launch moveit2_tutorials rviz_tutorial:=true

even though it didn't produce any error to stdout, Rviz2 GUI didn't open. I thought there was something wrong with Rviz2, I tried to run Rviz2 only with:


Again, nothing happened. I tried to interrupt it with CTRL+C nothing happened.

That's when I realized, none of ROS2 commands and packages work. I can't list topics/nodes. I can't run successfully built packages. I can't interrupt them with CTRL+C. I can only stop them with CTRL+Z. Then I can force kill (just "sudo kill pid" can't kill) the process.

The only CLI commands I can run are "help" and "daemon". And the "daemon status" outputs:

The daemon is not running

"daemon start" outputs:

Failed to confirm that the daemon started successfully

I can run Ros Noetic packages/commands without a problem. And I used to run Foxy commands/packages as well. I realized this 2 days ago but maybe it has been like this before than that. I reinstalled Foxy with:

sudo apt remove ~nros-foxy-* && sudo apt autoremove
sudo apt install ros-foxy-desktop

Nothing changed.

Just to better visualize, this is an example of what I have been through for a couple of days:

pantheon@pantheon:~$ source /opt/ros/foxy/setup.bash

pantheon@pantheon:~$ rviz2

WARNING: CPU random generator seem to be failing, disable hardware random number generation

WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff

^C[INFO] [1652177988.645153370] [rclcpp]: signal_handler(signal_value=2)


[1]+ Stopped rviz2

pantheon@pantheon:~$ ps


851668 pts/5 00:00:00 bash

852225 pts/5 00:00:05 rviz2

852748 pts/5 00:00:00 ps


Edit1: I can run ros2 multicast send/receive as well. Plus I added the output of ros2 run demo_nodes_cpp listener --ros-args --log-level DEBUG below. The process lingers like this indefinitely.

^C[INFO] [1652868642.298481658] [rclcpp]: signal_handler(signal_value=2)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-05-10 08:46:49 -0600

ljaniec gravatar image

Are your normal ROS 2 CLI commands working? E.g. ros2 topic list and so on. I remember some time ago when installing ROS 2 Galactic in a new, clean Ubuntu 20.04 my CLI stopped working. I had to reinstall some missing packages for it. Maybe it's similar with RViz2 in your case.

Another thing could be your workspace package dependencies - is everything installed for sure?

edit flag offensive delete link more


No, they are not working either. They just freeze. As for the workspace, well I only followed the MoveIt tutorial and there was no error. Besides, basic CLI commands should work regardless of the workspace right?

harun-loodos gravatar image harun-loodos  ( 2022-05-10 09:12:37 -0600 )edit

The way I see it, when ROS commands in the terminal don't work, neither do ROS launch files etc. Can you try to use the standard example with talker/listener? Does it work?

Regarding package dependencies - that was just another idea what could be wrong :) RViz couldn't start because of missing tools..?

ljaniec gravatar image ljaniec  ( 2022-05-10 09:30:46 -0600 )edit

No, talker/listener example does not work either. It is really strange and annoying

harun-loodos gravatar image harun-loodos  ( 2022-05-10 10:17:08 -0600 )edit

It looks like you need to reinstall ROS2 or try to fix the missing packages manually - the second option is less destructive, so try it first (e.g. with ros-foxy-ros2cli etc.). You can also try with ros2 daemon stop, ros2 daemon start.

ljaniec gravatar image ljaniec  ( 2022-05-10 10:38:09 -0600 )edit

Do you have your firewall enabled? A while back I had problems with ROS 2 and Gazebo simulations because it messed up my plugins etc. You can try to sudo apt-get install ros-foxy-... other packages, for me sudo apt autoremove after remove sometimes messed up my packages and I had to install them myself, even with full desktop install from Debian packages

ljaniec gravatar image ljaniec  ( 2022-05-18 08:04:33 -0600 )edit

Suggestions from @clalancete in duplicate:

Hm, this is quite a weird one. This seems to be working fine for me, and even seems to be working fine for you in a separate machine.

A few different things to try/check out:

Check out your networking setup, and make sure it is configured properly and has multicast enabled. Many ROS 2 commands won't work properly without multicast. Try running some of the ros2 commands with --no-daemon, like: ros2 topic list --no-daemon. Look for hardware errors in dmesg, and/or reboot the machine and try the tests again. Try running this test again on the same machine, but in a docker container. That can at least tell us if something is misconfigured on the host.

tfoote gravatar image tfoote  ( 2022-05-23 13:48:09 -0600 )edit

Question Tools



Asked: 2022-05-10 06:09:10 -0600

Seen: 240 times

Last updated: May 18 '22