Ask Your Question

Problem with ROS Networking.

asked 2013-02-17 10:14:13 -0500

TheSkyfall gravatar image

updated 2013-07-01 19:36:09 -0500

bit-pirate gravatar image


I have already tried this tutorial,

and everything was perfect, so I don't have a problem with Turtlebot networking setup. Now I'm trying to follow this tutorial

On my workstation, first I run

ssh name@turtlebot_lap

and when I run

rosrun turtlesim turtlesim_node

I get this error

turtlesim_node: cannot connect to X server

Any suggestions will be appreciated.


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-02-17 13:24:13 -0500

weiin gravatar image

I think that tutorial is not very clear. The turtlesim_node has to be run on the actual machine itself (ie in that tutorial, you have to run it on the r2d2 machine) and not through ssh. This is because turtlesim_node requires gui (X server) and you have to use "ssh -X name@turtlebot_lap" in order to see gui through ssh.

If you want to follow that tutorial, I would suggest using the r2d2 machine, open a terminal to ssh into c3po, and run roscore. Then, open a new terminal (this will be the r2d2 terminal) and run turtlesim_node.

Following the tutorial here would be easier.

edit flag offensive delete link more


@TheSkyfall please mark your question as answered, if this solution solved your problem. Thanks.

bit-pirate gravatar image bit-pirate  ( 2013-07-01 19:37:33 -0500 )edit

answered 2014-02-24 20:48:08 -0500

Arwen gravatar image

You also have two other options.

I wanted to roslaunch a gui so after hours of searching I found a way!

If you want to run the node and gui on the remote machine, after establishing ssh connection run this command.

export DISPLAY=:0

or (if the first one didn't work)

export DISPLAY=:0.0

the turtlesim node will be launched on the remote machine.

but if you want to get the gui on your main computer just use:

ssh -X

The good thing is by editing my file I was able to roslaunch my nodes. I just add the first command at the end of my file.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-02-17 10:14:13 -0500

Seen: 5,473 times

Last updated: Feb 24 '14