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

Ros2 WSL Firewall issues

asked 2019-12-22 20:00:36 -0500

atyshka gravatar image

Has anyone successfully used Ros2 with Windows Subsystem for Linux (V1)? I installed the latest Eloquent Binaries and started up the demo talker and listener nodes. I was immediately greeted with windows firewall prompts, which I allowed access to. However, even with this, the listener receives no messages. ros2 topic list shows nothing other than parameter events and rosout. Clearly the firewall is blocking some of the DDS communication. I was informed that WSL 2 fixes this issue, but that's currently not an option given that I cannot use Windows Insider builds on my PC. Anyone have any experience in getting this to work in WSL 1?

edit retag flag offensive close merge delete


Just a question, but do you have a particular reason to want to run this in WSL instead of using the native Windows binaries of ROS 2?

gvdhoorn gravatar image gvdhoorn  ( 2019-12-23 03:01:50 -0500 )edit

It's complicated. Using a Macbook Pro but the latest release of Macos (Catalina) is not officially supported for ROS. Plus I feel uncomfortable having to disable SIP. I'm equally comfortable with Linux, but drivers for mac hardware on linux are pretty terrible. Windows works fine, but I'm far more comfortable with a UNIX-like environment. So that led me to WSL, hoping to get the convenience of linux without having to deal with the bad drivers. If I can't get it to work, I can just use a plain old VM.

atyshka gravatar image atyshka  ( 2019-12-23 09:09:06 -0500 )edit

I've only used WSL 1, and it was never really 'the same' as a native install. WSL 2 supposedly comes as close as possible due to it just running a regular kernel and everything in a hypervisored-vm.

If you disable the firewall -- for a test -- do things start to work? If so, you could try to configure things such that you don't need to disable it, but still keep a working setup.

Your problem does sound a little like something you should ask the WSL developers/maintainers about (ie: Microsoft). It's essentially just an application running in WSL 2.

gvdhoorn gravatar image gvdhoorn  ( 2019-12-23 09:44:21 -0500 )edit

@gvdhoorn I can confirm a perfectly working setup in WSL2

atyshka gravatar image atyshka  ( 2020-07-28 18:38:35 -0500 )edit

@atyshka Have you figured this out? I have the same problem

maclo4 gravatar image maclo4  ( 2020-09-12 17:33:38 -0500 )edit

As stated, it will only work on WSL2. The networking stack in WSL doesn’t support all the Linux features that ros expects

atyshka gravatar image atyshka  ( 2020-09-14 08:17:38 -0500 )edit

@gvdhoorn I tried to run the nodes with the firewalls disabled and it seems to be working. However, it continued working even after I turned the firewalls on. Don't know how and why it worked.

Boris_Boris gravatar image Boris_Boris  ( 2022-04-25 06:32:42 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-12-11 09:52:45 -0500

osilva gravatar image

updated 2021-12-11 10:01:38 -0500

I know this question is a couple years old but it looks it's frequently viewed so decided to answer it.

Things have improved a lot when running ROS on Windows in the last few years. Yes there are still a few limitations and compatibility issues to deal with but no show stoppers in my opinion.

It may be confusing for someone new to ROS1 or ROS2 on Windows what direction to take as there are more than one: As of December 2021, this is a response on direction from ROS on Windows: is the source of truth for ROS development. the documentation was designed to bootstrap Windows development for ROS1 and help bootstrap ROS2. It also documents our first party ROS nodes and development tooling. It does need a refresh.

RoboStack, Open Robotics and Microsoft have collaborated on making RoboStack a first class citizen for ROS2; for all platforms. It needs to be represented on the website; there is work happening for that.

Windows 11 + WSL2 is a fantastic way of developing simulation if your ultimate target is a Linux based Robot. However, WSL cannot talk directly to hardware (even with the new USB bridge), so it is limited to simulated robots.

Source: by @OoeyGUI

For information on how to use WSL2 in Windows 10 and 11, recommend to follow this tutorial where ROS1 or ROS 2 can be installed:

For installation of ROS on Windows with Visual Studio, follow this tutorial:

For using RoboStackfor ROS 1 and ROS 2, suggest to visit:

Also it's possible to use great tools such as VSCodeusing ROS extension and is not limited to Windows: accompanied by many great tutorials:

In summary, if you want to develop ROS in Windows, thing have improved immensely in the last few years. For community support, you can visit: as well.

I am not sponsored or work for Microsoft, just a big fan on working on the Windows operating system as I used Visual Studio for many years.

And perhaps I am not answering the original question but hope this helps someone navigate using ROS on Windows.

edit flag offensive delete link more


This tutorial is helpful too

ljaniec gravatar image ljaniec  ( 2021-12-11 14:03:54 -0500 )edit

Question Tools



Asked: 2019-12-22 20:00:36 -0500

Seen: 2,191 times

Last updated: Dec 11 '21