Network with rosjava RosCore and ubuntu hydro nodes not working

asked 2015-02-26 03:19:29 -0600

chopchop gravatar image

Hi all, I'm trying to run a very simple network consisting of a rosjava MasterServer, and two nodes on a separate Ubuntu 12.04 machine running Hydro.

I start the RosCore with the following code:

public static void main(String [] args) {
    RosCore mRosCore = RosCore.newPublic(11311);
    try {
        mRosCore.awaitStart(5, TimeUnit.SECONDS);
    } catch (InterruptedException e) {
   System.out.println("Ros core started");
   while (true);

Then on the Ubuntu machine, I use rostopic to publish / subscribe to a simple String topic. The first time, everything works seamlessly. But when I stop either the publisher or subscriber, I get an error on the Java machine:

févr. 26, 2015 10:02:50 AM org.apache.xmlrpc.server.XmlRpcErrorLogger log
SEVERE: No such handler: system.multicall
org.apache.xmlrpc.server.XmlRpcNoSuchHandlerException: No such handler: system.multicall
    at org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getHandler(
    at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(
    at org.apache.xmlrpc.server.XmlRpcServer.execute(
    at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(
    at org.apache.xmlrpc.util.ThreadPool$Poolable$

Then when I try to restart the publisher or subscriber, it fails to contact the master:

Unable to register with master node []: master may not be running yet. Will keep trying.

And the Master machine spits out those errors in a loop:

egistrationManagerImpl  E  Error during onNodeReplacement call
                        E  java.lang.RuntimeException: failed to connect to / (port 46396) after 60000ms: isConnected failed: ECONNREFUSED
                            (Connection refused)
                        E      at org.ros.internal.node.xmlrpc.XmlRpcClientFactory$1.invoke(
                        E      at java.lang.reflect.Proxy.invoke(
                        E      at $Proxy0.shutdown(Unknown Source)
                        E      at org.ros.internal.node.client.SlaveClient.shutdown(
                        E      at org.ros.internal.node.server.master.MasterServer.onNodeReplacement(
                        E      at org.ros.internal.node.server.master.MasterRegistrationManagerImpl.obtainNodeRegistrationInfo(
                        E      at org.ros.internal.node.server.master.MasterRegistrationManagerImpl.registerPublisher(
                        E      at org.ros.internal.node.server.master.MasterServer.registerPublisher(
                        E      at org.ros.internal.node.xmlrpc.MasterXmlRpcEndpointImpl.registerPublisher(
                        E      at java.lang.reflect.Method.invoke(Native Method)
                        E      at java.lang.reflect.Method.invoke(
                        E      at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(
                        E      at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(
                        E      at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(
                        E      at org.apache.xmlrpc.server.XmlRpcServer.execute(
                        E      at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(
                        E      at
                        E      at org.apache.xmlrpc.util.ThreadPool$Poolable$

Is there something I am completely missing here? I know rosjava is not that mature but I thought my setup is ... (more)

edit retag flag offensive close merge delete


I am getting very similar behavior, have you been able to resolve your issue?

r2doesinc gravatar image r2doesinc  ( 2015-03-16 15:10:38 -0600 )edit

I suspect the rosjava master has a few bugs. Why can't you use the standard roscore?

ahendrix gravatar image ahendrix  ( 2015-03-17 01:32:01 -0600 )edit

I want to run everything embedded on Android so no Python (at least not easily)

chopchop gravatar image chopchop  ( 2015-03-18 03:21:16 -0600 )edit