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

eugen's profile - activity

2016-10-20 12:42:31 -0500 received badge  Nice Question (source)
2013-02-04 03:34:49 -0500 received badge  Famous Question (source)
2013-02-04 03:34:49 -0500 received badge  Popular Question (source)
2013-02-04 03:34:49 -0500 received badge  Notable Question (source)
2012-09-24 04:57:23 -0500 received badge  Famous Question (source)
2012-06-28 04:19:31 -0500 received badge  Notable Question (source)
2012-04-17 22:33:46 -0500 received badge  Popular Question (source)
2012-01-24 03:55:19 -0500 marked best answer rosjava - Subscriber java.net.ConnectException: localhost/127.0.0.1:37172 - Connection refused

It looks to me like you have not set ROS_IP on your host PC.

2012-01-18 18:34:26 -0500 marked best answer rosjava - how get a state/notificaiton of connection to ros-master

This is possible in the latest rosjava. However, it has not been released so you will have to build it from source. See: RegistrantListener for the interface and PublisherListener.

2012-01-01 05:27:59 -0500 received badge  Editor (source)
2012-01-01 05:26:19 -0500 asked a question rosjava - Subscriber java.net.ConnectException: localhost/127.0.0.1:37172 - Connection refused

Hello,

I am trying to start a ros Subscriber an android device. My sourcecode look like:


String hostLocal = InetAddressFactory.newNonLoopback().getHostAddress();
String hostMaster = ((EditText)findViewById(R.id.txtHostValue)).getText().toString();
Integer port = Integer.parseInt(((EditText)findViewById(R.id.txtPortValue)).getText().toString());
URI uri = URI.create("http://" + hostMaster + ":" + port);              

NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(hostLocal, uri);          
nodeConfiguration.setMasterUri(uri);
nodeConfiguration.setNodeName("nodeName");  
nodeRunner.run(new Listener(), nodeConfiguration);

If i start the ros-master local on my android device - it works fine. But if the master is running an my PC (for example: hostMaster = "192.168.178.29"), i get an error:


E/UpdatePublisherRunnable(10630): java.lang.RuntimeException: java.net.ConnectException: localhost/127.0.0.1:37172 - Connection refused

by trying to debug your sourcecode and I have seen in 'MasterClien.java' file a following function:


return Response.fromListChecked(node.registerSubscriber(slave.getName().toString(), subscriber
        .getTopicName().toString(), subscriber.getTopicMessageType(), slave.getUri()
        .toString()), new UriListResultFactory());

Befor I had called a funciton, I had follwing screen:

image description

But after calling of function I have seen:

image description

You can see, that after calling a funciton it is the uri of client not the same. Is this issue known or not. What can I do?

2011-12-29 05:11:50 -0500 received badge  Student (source)
2011-12-29 04:45:18 -0500 asked a question rosjava - how get a state/notificaiton of connection to ros-master

I started with pubsub-tutorial, it works fine. Now, I am trying to write my own app with rosjava und need to know current state of connection to ros-master.

Are there a possibility to get this state (connected or not) or to be notificated about change it.

I can see errors in output-window, but I can not handle it:


12-29 19:02:02.398: W/Registrar(4016): Master registration failed and will be retried.
12-29 19:02:02.398: W/Registrar(4016): java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.net.ConnectException: Arbeitslaptop-Ubuntu.fritz.box/192.168.178.30:11311 - Connection refused
12-29 19:02:02.398: W/Registrar(4016):  at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:224)
12-29 19:02:02.398: W/Registrar(4016):  at java.util.concurrent.FutureTask.get(FutureTask.java:83)
12-29 19:02:02.398: W/Registrar(4016):  at org.ros.internal.node.client.Registrar$RetryLoop.loop(Registrar.java:81)
12-29 19:02:02.398: W/Registrar(4016):  at org.ros.concurrent.CancellableLoop.run(CancellableLoop.java:47)
12-29 19:02:02.398: W/Registrar(4016):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
12-29 19:02:02.398: W/Registrar(4016):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
12-29 19:02:02.398: W/Registrar(4016):  at java.lang.Thread.run(Thread.java:1019)
12-29 19:02:02.398: W/Registrar(4016): Caused by: java.lang.RuntimeException: java.net.ConnectException: Arbeitslaptop-Ubuntu.fritz.box/192.168.178.30:11311 - Connection refused
12-29 19:02:02.398: W/Registrar(4016):  at org.ros.internal.node.xmlrpc.XmlRpcClientFactory$1.invoke(XmlRpcClientFactory.java:152)
12-29 19:02:02.398: W/Registrar(4016):  at $Proxy0.registerPublisher(Native Method)
12-29 19:02:02.398: W/Registrar(4016):  at org.ros.internal.node.client.MasterClient.registerPublisher(MasterClient.java:136)
....

Thank you in advance