Buscar este blog

martes, 8 de marzo de 2011

Running ROS on multiple machines


I am working with two computers: lola and XPS with known IP adresses.
In order for them to identify each other as hosts I indicated their IP adresses on etc/hosts:

10.48.56.34 lola
10.48.61.241 XPS

1. First, they need to ping each other.

On lola:

$ssh lola
$ping XPS

Something like this appears:

PING XPS (10.48.61.241) 56(84) bytes of data.
64 bytes from XPS (10.48.61.241): icmp_seq=1 ttl=64 time=4.35 ms
64 bytes from XPS (10.48.61.241): icmp_seq=2 ttl=64 time=4.79 ms
64 bytes from XPS (10.48.61.241): icmp_seq=3 ttl=64 time=3.65 ms
And then on XPS

$ssh XPS
$ping lola

"ping only checks that ICMP packets can get between the machines, with isn't enough. You need to make sure that you can communicate over all ports.
In lieu of a complete check, you can use netcat to try communicating over an arbitrarily selected port. Be sure to pick a port greater than 1024; ports below 1024 require superuser privileges."

3. I use netcat in order to verify that port 3333 allows communication.

 On lola:

$ nc -l 3333

Then on XPS

$ nc lola 3333

This setups a rustic chat room between computers that works just fine.
 However, when I try inverting the roles of the computers, communication isn't achieved.


That should be causing the unsuccessful running of roscore on XPS. 

II. In spite of knowing something isn't really ok with the network connection of my computers I proceed with the instructions of Getting Started with P2OS which actually worked fine for me before I reinstalled Ubuntu and ROS in lola.

1. I have decided XPS is going to be directly connected to my Pioneer, therefore, lola will be running the master.


2. On lola's setup.sh I comment the line: 

#if [ ! "$ROS_MASTER_URI" ] ; then export ROS_MASTER_URI=http://localhost:11311 ; fi

And include the following lines:

export ROS_MASTER_URI=http://lola:11311
export ROS_MASTER_IP=http://lola

3. On XPS' setup.sh I comment the same line and include

export ROS_MASTER_URI=http://lola:11311

4. I run roscore on lola and display rxgraph on both computers. /rosout is displayed which seems to indicate roscore is running successfully on them both.

5. I run RosAria node on XPS (which is connected to Pio) and connection is succesfully established.

6. I then run my teleoperation node on lola and while verifying node connection on rxgraph I get the following error:

 ERROR: Communication with node[http://XPS:58281/] failed!

7. Actually,  when I run rxgraph on XPS every single node  and topic seems to be working fine, but in lola RosAria node is enclosed in two red circles which I read indicates connection isn't being fully established.

No hay comentarios:

Publicar un comentario