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

nodes with 2 computers [closed]

asked 2011-04-08 02:54:23 -0600

updated 2014-01-28 17:09:30 -0600

ngrennan gravatar image

Hi, I am trying to make a node on one computer(computer A) with some publishers and some services and try to read the messages and call some services with another computer(computer B).

computer A(ip is 192.168.1.100) and computer B(ip is 192.168.1.101) are connected since they can ping each other

computer A runs a roscore since it is the master.

on computer A, I set the ROS_MASTER_URI at http://localhost:11311 on computer B, I set the ROS_MASTER_URI at http://192.168.1.100:11311 and the ROS_HOSTNAME at 192.168.1.101

and yet it doesn't work, I don't even receive the topics messages,

I am sure I am doing something wrong or maybe didn't configure my network properly.

Does someone happen to know how to solve the problem?

Thank you so much for your help.

edit : Just for updates, when on the computer B I do rostopic list I receive the list of topics that is running on the computer A, so the configuration is good.

However, I didn't try for the services, but on the computer B I can't receive the image coming from a kinect that is on the computer A.

Did anyone have this problem before?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by SL Remy
close date 2017-07-21 02:05:40.864055

Comments

your spacing/comma usage on the line with the ROS_MASTER_URIs is misleading.
aleeper gravatar image aleeper  ( 2011-04-08 03:34:53 -0600 )edit

7 Answers

Sort by ยป oldest newest most voted
2

answered 2011-04-08 05:27:55 -0600

raphael favier gravatar image

updated 2011-04-08 05:30:45 -0600

Hello, did you try the following troubleshooting page - section 2?

Troubleshooting - 2 Network Configuration

I think your problem comes from ROS_IP not being set correctly.

In my experience, both computers should have ROS_IP set to their own IP address. Make sure they are set to the correct values as they are not initialized by default.

The one on which the master runs should have ROS_MASTER_URI=http://localhost:11311

The one that connect to the master should have ROS_MASTER_URI=http://[IP_OF_MASTER_MACHINE]:11311

Raph

edit flag offensive delete link more

Comments

In my experience, both computers should have ROS_IP set to their own IP address.

ROS_IP needs set on the terminals that run the nodes' processes.

130s gravatar image 130s  ( 2015-03-18 23:48:53 -0600 )edit
2

answered 2011-04-08 06:16:07 -0600

Relevant wiki pages that are very useful for everyone using multiple machines:

edit flag offensive delete link more
1

answered 2011-04-08 03:35:15 -0600

aleeper gravatar image

I think you also need to tell computer A how to refer to itself, e.g. export ROS_HOSTNAME=192.168.1.100 on computer A.

edit flag offensive delete link more

Comments

Thank you for the idea, I tried but It doesn't help.
MorganCormier gravatar image MorganCormier  ( 2011-04-08 04:29:13 -0600 )edit
I think, if you want to use an IP address, you should better use ROS_IP, not ROS_HOSTNAME.
Lorenz gravatar image Lorenz  ( 2011-04-11 03:44:33 -0600 )edit
0

answered 2011-05-09 19:04:15 -0600

embeddedheaven gravatar image

Thanks you guy much I got working and also an notice that we should disable firewall in bold computer in my case

sudo ufw disable
edit flag offensive delete link more
0

answered 2011-04-08 09:03:32 -0600

It works perfectly if I use an ethernet cable. Thank you for your help.

edit flag offensive delete link more
0

answered 2011-04-08 04:33:26 -0600

Are you sure you are working with the same ros version on both computers? We lately hat a problem that one computer still had cturtle paths in $ROS_PACKAGE_PATH and $PATH. How do you want to receive the kinect images? Have you tried something like rostopic echo /camera/rgb/image_color/header ? Any error messages?

edit flag offensive delete link more

Comments

I ran the command and so that I didn't have the permissions to do it. So I loged in root and did it again, I received the messages. So I ran my program and saw the image.The new problem is that it is very slow,I have something like one image every 1 or 2 seconds, Any thoughts on how to improve that?
MorganCormier gravatar image MorganCormier  ( 2011-04-08 04:40:48 -0600 )edit
0

answered 2011-04-08 07:12:51 -0600

Thank you all for your answers. It is working fine by setting ROS_HOSTNAME and running nodes in root mode. However it is slow, ! image per 2 seconds. I used roswtf on both machines, I don't have any error but I have some interesting warnings on computer B :

WARNING Communication with master is very slow (>0.5s average) WARNING Communication with node [/openni_camera] is very slow

I already checked the wiki and didn't see anything related to speed problems. I checked the networksetup page and everything is working fine, I can ping and netscan between the two computers.

I will try by setting a direct network between the two computers instead of going trough my router.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-04-08 02:54:23 -0600

Seen: 8,449 times

Last updated: May 09 '11