0
$\begingroup$

Rosanswers logo

HI everyone, I have been trying to learn how to connect two ROS machines to the same master. I am using Linux in Virtual machine (VBox) , and raspbian jessie, and i want the master to run on the linux. what i did was both ROS are kinetic

when i run the linux, i do these steps:

1- hostname -I

i think the first one for the Virtual machine and the second id for the main OS with is MAC OS

 10.0.2.15  10.0.3.1

2-export ROS_IP=10.0.2.15

3-roscore

then i move to the raspbian jessie:

1- hostname -I

 10.0.0.8   2601:1c:8601 ......etc <<very long address with letters and numbers

2-export ROS_MASTER_URI=http://10.0.2.15:11311/

3-export ROS_IP=10.0.0.8

each machine can ping itself, but when i ping the ROS on jessie from linux to seems to work and give me something like

 64 bytes from 10.0.0.8: icmp_seq=0 ttl=63 time=39.868 ms
 64 bytes from 10.0.0.8: icmp_seq=1 ttl=63 time=9.677 ms
 64 bytes from 10.0.0.8: icmp_seq=2 ttl=63 time=38.659 ms

but when i ping the linux from jessie it does not work, it fails.

so does anyone know how to solve that?

*edit 1: when i try to run roscore on jessie it runs with master 10.0.0.8 even though i assigned export

 ROS_MASTER_URI=http://10.0.2.15:11311/

so it looks that it did not get it !?

*edit2: after running netcat i found out that the linux machine can see the raspbian but the raspbian can not see the linux


Originally posted by Mohammedism on ROS Answers with karma: 32 on 2018-01-28

Post score: 0


Original comments

Comment by jayess on 2018-01-28:\

it does not work, it fails

What does this mean? Also, being able to ping isn't sufficient. Check out http://wiki.ros.org/ROS/NetworkSetup#Further_check:_netcat

Comment by Mohammedism on 2018-01-28:
it means that it says something like: 3 packet transmitted , 0 received , 100% packet loss, time 1024 ms

Comment by jayess on 2018-01-28:
Are you setting the environment variables and running everything from the same terminal? Once you open a new terminal you have to set the environment variables all over again.

Comment by Mohammedism on 2018-01-28:
yes, i added them to the ~/.bashrc and i also set them manually in every terminal.

as i said some machine A sees B bug B does not see A or at least this is what i understood

is it possible the problem is that the linux in running in virtual machine?

Comment by jayess on 2018-01-28:
Yes, that does change things. Definitely update and retag your question indicating that you're using a virtual machine.

Comment by Mohammedism on 2018-01-28:
oh thanks for the notes, i will update it

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It's look like a problem with vbox network configuration, the vbox create a subnet inside the computer and to access from outside you need to configure the vbox. Try following this tutorial.


Originally posted by rdelgadov with karma: 51 on 2018-01-29

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Mohammedism on 2018-01-29:
thanks man, i figured out what was the problem. I had my network attached to NAT which will use the main machine ip address, with an extension, which wont work. so i had to attach my virtual machine to bridget wifi adaptor, which will give the VM separate ip

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.