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

WSL: Couldn't rosrun turtlesim turtlesim_node

asked 2019-02-08 03:12:34 -0500

shmpwk gravatar image

updated 2019-02-08 05:21:40 -0500

gvdhoorn gravatar image

I am following the beginner rosnode tutorial http://wiki.ros.org/ROS/Tutorials/UnderstandingNodes.

The environment is Windows 10 / WSL. When I enter command rosrun turtlesim turtlesim_node after running "roscore", I get the following error:

wn-003% rosrun turtlesim turtlesim_node
QXcbConnection: Could not connect to display
zsh: abort (core dumped)  rosrun turtlesim turtlesim_node

Are there any solutions to this? Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-02-08 03:35:24 -0500

gvdhoorn gravatar image

The environment is Windows 10 / WSL. [..] QXcbConnection: Could not connect to display. Are there any solutions to this?

Do you have an X server running and have you setup everything to use that X server?

Please note that ROS on Ubuntu on WSL on Windows 10 is not a supported configuration, so you're bound to run into issues.

edit flag offensive delete link more

Comments

I've downloaded X server and I succeeded rosrun turtlesim turtlesim_node Thank you!

shmpwk gravatar image shmpwk  ( 2019-02-08 05:16:08 -0500 )edit

Oh no! When I restart PC and do rosrun turtlesim turtlesim_node .I get the same error.

shmpwk gravatar image shmpwk  ( 2019-02-08 09:20:24 -0500 )edit

Have you restarted the X server? The X servers for Windows I know are not services, nor part of "the system", but regular programs. So you'll have to start them manually.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-08 09:25:19 -0500 )edit

Yes, I restarted the X server. But failed.

shmpwk gravatar image shmpwk  ( 2019-02-08 09:40:20 -0500 )edit

Is the DISPLAY variable also set?

gvdhoorn gravatar image gvdhoorn  ( 2019-02-08 09:53:35 -0500 )edit

yes in .bashrc file, there is

export DISPLAY=:0
shmpwk gravatar image shmpwk  ( 2019-02-08 10:03:23 -0500 )edit

Well, as I wrote in my answer, this is not a supported configuration. Although it can work -- as I've seen many people set things up this way, and I've done it myself -- there is no guarantee.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-08 10:43:11 -0500 )edit
0

answered 2019-02-08 13:02:24 -0500

OoeyGUI gravatar image

Hi there, If you are interested in trying out ROS on Windows, Microsoft ported ROS to Windows and is in the process upstreaming that work to main. In the mean time, you can get started visit http://aka.ms/ros . We'll be integrating the documentation once the up-streaming that port has been completed.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-02-08 03:12:34 -0500

Seen: 2,330 times

Last updated: Feb 08 '19