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

Problem with ROS Networking.

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

TheSkyfall gravatar image

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

bit-pirate gravatar image

Hello,

I have already tried this tutorial,

http://www.ros.org/wiki/Robots/TurtleBot/Network%20Setup

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

http://nootrix.com/2012/06/ros-networking/

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.

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

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

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

Comments

@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 -0600 )edit
3

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

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 env.sh file I was able to roslaunch my nodes. I just add the first command at the end of my env.sh file.

edit flag offensive delete link more

Question Tools

Stats

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

Seen: 5,950 times

Last updated: Feb 24 '14