In order to communicate successfully via DDS, the used network interface has to be multicast enabled. We’ve seen in past experiences that this might not necessarily be enabled by default (on Ubuntu or OSX) when using the loopback adapter. See the original issue or a conversation on ros-answers. You can verify that your current setup allows multicast with the ROS 2 tool:
In Terminal 1:
ros2 multicast receive
In Terminal 2:
ros2 multicast send
Import failing even with library present on the system¶
rclpy fails to be imported because of some missing DLLs on your system.
If so make sure to install all the dependencies listed in the “Installing prerequisites” sections of the installation instructions (Windows, MacOS).
If you are installing from binaries, you may need to update your dependencies: they must be the same version as those used to build the binaries.
If you are still having issues, you can use the Dependencies tool to determine which dependencies are missing on your system.
Use the tool to load the corresponding
.pyd file, and it should report unavailable
Be sure that the current workspace is sourced before you execute the tool, otherwise there will be unresolved ROS DLL files.
Use this information to install additional dependencies or adjust your path as necessary.