Network with rosjava RosCore and ubuntu hydro nodes not working
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);
mRosCore.start();
try {
mRosCore.awaitStart(5, TimeUnit.SECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
}
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(AbstractReflectiveHandlerMapping.java:214)
at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:45)
at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86)
at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:200)
at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
Then when I try to restart the publisher or subscriber, it fails to contact the master:
Unable to register with master node [http://192.168.1.204:11311]: 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: java.net.ConnectException: failed to connect to /192.168.1.204 (port 46396) after 60000ms: isConnected failed: ECONNREFUSED
(Connection refused)
E at org.ros.internal.node.xmlrpc.XmlRpcClientFactory$1.invoke(XmlRpcClientFactory.java:157)
E at java.lang.reflect.Proxy.invoke(Proxy.java:397)
E at $Proxy0.shutdown(Unknown Source)
E at org.ros.internal.node.client.SlaveClient.shutdown(SlaveClient.java:62)
E at org.ros.internal.node.server.master.MasterServer.onNodeReplacement(MasterServer.java:485)
E at org.ros.internal.node.server.master.MasterRegistrationManagerImpl.obtainNodeRegistrationInfo(MasterRegistrationManagerImpl.java:431)
E at org.ros.internal.node.server.master.MasterRegistrationManagerImpl.registerPublisher(MasterRegistrationManagerImpl.java:97)
E at org.ros.internal.node.server.master.MasterServer.registerPublisher(MasterServer.java:216)
E at org.ros.internal.node.xmlrpc.MasterXmlRpcEndpointImpl.registerPublisher(MasterXmlRpcEndpointImpl.java:92)
E at java.lang.reflect.Method.invoke(Native Method)
E at java.lang.reflect.Method.invoke(Method.java:372)
E at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:115)
E at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106)
E at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:46)
E at org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86)
E at org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:200)
E at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
E at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
Is there something I am completely missing here? I know rosjava is not that mature but I thought my setup is ...
I am getting very similar behavior, have you been able to resolve your issue?
I suspect the rosjava master has a few bugs. Why can't you use the standard roscore?
I want to run everything embedded on Android so no Python (at least not easily)