Edit on Github

Troubleshooting

Enable Multicast

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

Sometimes 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.