0
$\begingroup$

Rosanswers logo

EDIT: I apologize for not providing more information earlier. Here is what we have so far:

Both computers are running Ubuntu 11.04 32bit with ROS Electric and the latest rosjava. We installed ROS using the sudo apt-get install instructions listed in the tutorials, and rosjava with the mercurial instructions listed in its tutorial.

When running the basic pubsub tutorial on a single computer, everything works as is expected. The result of rosnode list -a is :

oryx@oryx-client:~$ rosnode list -a
http://127.0.0.1:52560 /listener
http://oryx-client:54630/ /rosout
http://127.0.0.1:34734 /talker

The trouble occurs when I try to run the pubsub tutorial across multiple computers. I run through the normal checklist of adding the appropriate ip addresses to each computers hostlist. On both the client (oryx-client) and the server (oryx-server) I export ROS_MASTER_URI to http://oryx-client:11311.

To test it, I ran the python pubsub tutorial between the two computers. Everything worked as expected. When I try to run the rosjava pub sub tutorials, the listener on oryx-client crashes, returning the error:

Loading node class: org.ros.tutorials.pubsub.Listener
Nov 7, 2011 1:25:19 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Nov 7, 2011 1:25:19 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Nov 7, 2011 1:25:19 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Nov 7, 2011 1:25:19 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Nov 7, 2011 1:25:19 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection refused
Nov 7, 2011 1:25:19 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
INFO: Retrying request
Nov 7, 2011 1:25:19 PM org.ros.internal.node.topic.UpdatePublisherRunnable run
SEVERE: java.lang.RuntimeException: java.net.ConnectException: Connection refused

Running a rosnode list -a, as suggested, yields :

http://127.0.0.1:40997 /listener
http://oryx-client:51694/ /rosout
http://127.0.0.1:39597 /talker

Running roswtf returns with:

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...
ERROR: connection refused to [http://127.0.0.1:39597]
... done running graph rules

Online checks summary:

Found 2 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING Node [/listener] is not connected to anything
WARNING The following nodes are unexpectedly connected:

Found 3 error(s).

ERROR Communication with [/talker] raised an error:
ERROR Could not contact the following nodes:

  • /talker

ERROR The following nodes should be connected but aren't:

  • /talker->/listener (/chatter)

Again, it works perfectly fine with the python pubsub, so I am not sure if we have to do anything extra for the network configuration. Similarly, it works when we run the python talker on the server and the java listener on the client, yielding a rosnode list -a of :

http://127.0.0.1:53929 /listener
http://oryx-client:53117/ /rosout
http://oryx-server:53299/ /talker_701_1320693074932

Like I said, I am not quite sure what is going on. I would imagine that, if it is able to see the node on the other computer, it should be able to communicate with it. Hopefully this is enough information to help find a solution.

Thank you,
Joe


Originally posted by Joe on ROS Answers with karma: 85 on 2011-11-04

Post score: 3


Original comments

Comment by kwc on 2011-11-05:
Can you update your question (using 'edit') to include the output of "rosnode list -a"? I suspect that your rosjava processes are reporting a different network address, please follow the support guidelines and include information about the versions of what is installed, and how you installed it.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Hi Joe, in rosjava you have to explicitly make sure, that the nodes bind to an external address. I dont know if the publisher and subscriber in the tutorial are getting configured that way.

How to bind a node to an external address is explained here: rosjava Node Tutorial

Another Testcase you could try is running the roscore on Computer A and both the listener and talker on Computer B. If my guess is correct that constellation should work...


Originally posted by Ben_S with karma: 2510 on 2011-11-07

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by kwc on 2011-11-07:
Ben_S is correct. The rosjava client is binding to a local address (127.0.0.1) that cannot be accessed from other computers.

$\endgroup$

Your Answer

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