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

Revision history [back]

click to hide/show revision 1
initial version

I am struggling since days to install ROS & Rviz on my Windows 10 Pc. I first installed Ubuntu melodic using windows app store

This implies that you're using WSL to run an Ubuntu user land and have installed ROS into that.

Windows 10 nor WSL come with an X Server, which is the part that renders the graphical windows required to use the UI part of ROS (ie: RViz, Gazebo, etc).

You don't appear to have an X Server running (and probably neither have one installed), but still try to run rviz, you receive the error message ("Could not connect to any X display").

You'll have to install a suitable X Server on the Windows 10 side (so not inside WSL). In the past people have used VcXsrv and Xming. Whether those still work I couldn't say.

And finally: you may already be aware, but although WSL (and WSL 2) are very nice and convenient from a technological perspective, there are still certain things that don't work correctly with it. At least with WSL 1 (ie: the original one) networking has always been a weak point, and seeing as ROS is extensively networked, certain aspects of ROS were not as robust running under WSL as they could be. See #q238646 for an earlier question.

This situation could have improved and WSL 2 uses a rather different approach to how WSL is implemented and run, but I wanted to let you know as you may run into problems that could, potentially, be caused by WSL and not ROS or its configuration.

I am struggling since days to install ROS & Rviz on my Windows 10 Pc. I first installed Ubuntu melodic using windows app store

This implies that you're using WSL to run an Ubuntu user land and have installed ROS into that.

Windows 10 nor WSL come with an X Server, which is the part that renders the graphical windows required to use the UI part of ROS (ie: RViz, Gazebo, etc).

etc). You don't appear to have an X Server running (and probably neither have one installed), but still try to run rviz, you receive the error message ("Could not connect to any X display").

You'll have to install a suitable X Server on the Windows 10 side (so not inside WSL). See this AskUbuntu Q&A for some more info. In the past people have used VcXsrv and Xming. Whether those still work I couldn't say.

And finally: you may already be aware, but although WSL (and WSL 2) are very nice and convenient from a technological perspective, there are still certain things that don't work correctly with it. At least with WSL 1 (ie: the original one) networking has always been a weak point, and seeing as ROS is extensively networked, certain aspects of ROS were not as robust running under WSL as they could be. See #q238646 for an earlier question.

This situation could have improved and WSL 2 uses a rather different approach to how WSL is implemented and run, but I wanted to let you know as you may run into problems that could, potentially, be caused by WSL and not ROS or its configuration.