ROS2 Humble on Windows 10 hangs when a second ros2 node is started

asked 2022-10-24 06:17:15 -0500

CraigH100 gravatar image

updated 2022-10-24 13:45:49 -0500

ROS2 Foxy used to work fine on my PC (with multiple DDS vendors) but I have recently upgraded to Humble and I can not get it working, even after multiple re-installs in different ways. Foxy also now does not work (which is partly expected as I have upgraded some of the dependencies, as per the instructions).

If I start a node, e.g. with

ros2 topic pub chatter std_msgs/msg/Bool "{}"

And I then start a second node, e.g. with

ros2 topic echo chatter std_msgs/msg/Bool

The second node does not print anything to the console, and then does not allow me to exit using ctrl c.

It is always the second node, if I start them the other way around, it is the publisher that seems to stop responding and will not let me exit with ctrl c, and the topic echo will let me exit, but it does not receive any messages from the publisher.

This is also the case with the example nodes. I have tried the below in different orders:

demo_nodes_cpp talker
demo_nodes_cpp listener
demo_nodes_py talker
demo_nodes_py listener

And always the second node seems to hang and then not let me quit. I have to kill the process by closing the terminal from which it was started.

I have uninstalled and reinstalled multiple times in different ways, and was very careful to follow the instructions and make sure there is nothing out of place in my environment variables.

I have done both the binary install and source install from https://docs.ros.org/en/humble/Instal... and I have done the choco install from https://ms-iot.github.io/ROSOnWindows... (replacing choco upgrade ros-foxy-desktop with choco upgrade ros-humble-desktop). All produce the same behaviour.

I have tried this using the default rmw (not changing any environment variables), and also using $env:RMW_IMPLEMENTATION="rmw_connextdds" (I have a research licence for connext DDS). I sourced connext with.

call ..\..\rti_connext_dds-6.1.0\resource\scripts\rtisetenv_x64Win64VS2017.bat

If I source my old ros2 foxy install, this also gives the same behaviour even though it used to work reliably. This makes me believe that is something to do with the dependencies that foxy/humble use:

I have installed these versions, as per the instructions:

https://docs.ros.org/en/humble/Instal...

I previously had these versions due to my foxy install

https://docs.ros.org/en/foxy/Installa...

As you can see, bullet and log4cxx have changed.

If I uninstall the choco packages and reinstall the version as per the ros2 foxy instructions, ros2 foxy starts working again. But if I then uninstall the choco packages again and reinstall the versions as per the ros2 humble instructions, I still have this problem.

My package versions can be seen here:

image description

This has been bothering me for about a week, how can I fix this? What is likely to cause a ROS2 application to hang on start up?

Thank you!

edit

I have used the python REPL to find exactly where the program ... (more)

edit retag flag offensive close merge delete