Ask Your Question
0

Roscore on virtual machine

asked 2016-03-01 14:34:52 -0600

mielto gravatar image

Hi, I'm trying to run roscore on virtual machine in cloud and connect robots to it. I have installed ros on vm. I have a openvpn server running as well, so robots could communicate with cloud and vice versa. On my robot I have openvpn client running.

Lets say my IP on vm is: 1.1.1.1 and virtual network ip is 2.2.2.2

On robot ip: 3.3.3.3 and virtual network ip 4.4.4.4

On vm: openvpn server running, roscore running, I used export ROS_HOSTNAME=2.2.2.2

On robot: openvpn client running, I used export ROS_MASTER_URI=http://mycloud.cloudapp.net:11311 and export ROS_HOSTNAME=4.4.4.4

And I get the error "Unable to communicate with master" on my robot.

Can anyone help me with this issue.Thank you very much

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-03-01 19:59:33 -0600

Arowana gravatar image

It looks like your ROS_MASTER_URI is using a domain name, which might be linked to the public IP. You might want to try ROS_MASTER_URI=http://4.4.4.4:11311 The VM and your robot should use the same IP and ports. Otherwise you are not trying to connect to the same rosmaster.

You want to run your master in the cloud so all IPs should be 4.4.4.4 you should have then on your VM ROS_HOSTNAME=4.4.4.4

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

Stats

Asked: 2016-03-01 14:34:52 -0600

Seen: 962 times

Last updated: Mar 01 '16