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

I cannot control a turtle spawned in another machine.

asked 2011-04-03 18:32:38 -0500

Hyon Lim gravatar image

updated 2011-06-15 15:09:56 -0500

mmwise gravatar image

Thank you. I can connect to roscore from machine #2. But, another problem.

I would like to control turtle (turtlesim example) in #1 using #2 keyboard.

So in #1,

$ rosrun turtlesim turtlesim_node

And in #2,

$ rosrun turtlesim turtle_teleop_key

However, I couldn't control. And I also ran the 'rxgraph' util, it seems not connected.

What's the problem?

Here's my roswtf result. I confirmed that, I can connect to machine #1 via 11311 port by using netcat utility

hyon-no2@hyon-no2-desktop:~$ roswtf
Loaded plugin tf.tfwtf
No package or stack in context
Static checks summary:

No errors or warnings
Beginning tests of your ROS graph. These may take awhile...
analyzing graph...
... done analyzing graph
running graph rules...
connection to [/rosout] timed out
... done running graph rules

Online checks summary:

Found 2 error(s).

ERROR Could not contact the following nodes:
 * /rosout

ERROR Errors connecting to the following services:
 * service [/rosout/set_logger_level] appears to be malfunctioning: Unable to communicate with service [/rosout/set_logger_level], address [rosrpc://hyon-no1-desktop:35930]
 * service [/rosout/get_loggers] appears to be malfunctioning: Unable to communicate with service [/rosout/get_loggers], address [rosrpc://hyon-no1-desktop:35930]
edit retag flag offensive close merge delete


For the record, this is a follow-up question to this one:
Martin Günther gravatar image Martin Günther  ( 2011-04-04 02:28:16 -0500 )edit

3 Answers

Sort by » oldest newest most voted

answered 2011-04-04 02:42:41 -0500

When you refer to a host by hostname (in your example, you seem to be using hyon-no1-desktop), you must have some way to resolve that hostname to an IP address (e.g., using DNS, Avahi or /etc/hosts).

When your refer to a host by IP address (like, you shouldn't have to enter that IP into /etc/hosts.

edit flag offensive delete link more

answered 2011-04-04 01:34:49 -0500

dornhege gravatar image

You could also set the ROS_IP environment variable when you run a ros node, if you cannot/do not want to add the IP to the hosts file.

edit flag offensive delete link more

answered 2011-04-03 19:07:53 -0500

Hyon Lim gravatar image

Self answer. This is resolved. I added host machine ip address to /etc/hosts. However, is this needed to all machines manually?

edit flag offensive delete link more


You could configure a DNS server to resolve names to addresses, but that is probably overkill for this situation. An alternative would be to keep a master hosts file on the master node and replicate it to all your machines using a shell script.
JonW gravatar image JonW  ( 2011-04-05 01:44:51 -0500 )edit

Question Tools


Asked: 2011-04-03 18:32:38 -0500

Seen: 837 times

Last updated: Apr 04 '11