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

rosjava_core + turtlesim = compatibility problems?

asked 2013-10-02 01:16:23 -0500

jrd gravatar image

updated 2014-01-28 17:18:07 -0500

ngrennan gravatar image

Hi,

I just wanted to test how the rosjava_core (java master) is able to handle communication between C++ nodes. So I tried to:
-launch java implementation of master (by simple script in my: jroscore repo )
-and start two turtlesim demo nodes

If I run (in 3 terminals) these commands in sequence:

./jroscore # launches ros master implemented in rosjava_core
rosrun turtlesim turtle_teleop_key 
rosrun turtlesim turtlesim_node

The communication and everything works fine, but if I launch them in another sequence:

./jroscore # launches ros master implemented in rosjava_core
rosrun turtlesim turtlesim_node 
rosrun turtlesim turtle_teleop_key

The rosjava_core throws this exception after launching the last one:

./jroscore
jroscore: Launching master server now, uri: <a href="http://localhost:11311/">http://localhost:11311/</a>
jroscore: Server successfully launched on address: <a href="http://localhost:11311/">http://localhost:11311/</a>
Oct 02, 2013 1:12:36 PM org.apache.xmlrpc.server.XmlRpcErrorLogger log
SEVERE: Failed to invoke method registerPublisher in class org.ros.internal.node.xmlrpc.MasterXmlRpcEndpointImpl: 
org.apache.xmlrpc.common.XmlRpcInvocationException: Failed to invoke method registerPublisher in class org.ros.internal.node.xmlrpc.MasterXmlRpcEndpointImpl: 
    at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:129)
    at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106)
    at org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:46)
    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)
Caused by: org.ros.exception.RemoteException: 
    at org.ros.internal.node.response.Response.fromListChecked(Response.java:115)
    at org.ros.internal.node.client.SlaveClient.publisherUpdate(SlaveClient.java:119)
    at org.ros.internal.node.server.master.MasterServer.contactSubscriberForPublisherUpdate(MasterServer.java:269)
    at org.ros.internal.node.server.master.MasterServer.publisherUpdate(MasterServer.java:251)
    at org.ros.internal.node.server.master.MasterServer.registerPublisher(MasterServer.java:225)
    at org.ros.internal.node.xmlrpc.MasterXmlRpcEndpointImpl.registerPublisher(MasterXmlRpcEndpointImpl.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:115)
    ... 6 more
Caused by:
org.ros.exception.RemoteException: 
    at org.ros.internal.node.response.Response.fromListChecked(Response.java:115)
    at org.ros.internal.node.client.SlaveClient.publisherUpdate(SlaveClient.java:119)
    at org.ros.internal.node.server.master.MasterServer.contactSubscriberForPublisherUpdate(MasterServer.java:269)
    at org.ros.internal.node.server.master.MasterServer.publisherUpdate(MasterServer.java:251)
    at org.ros.internal.node.server.master.MasterServer.registerPublisher(MasterServer.java:225)
    at org.ros.internal.node.xmlrpc.MasterXmlRpcEndpointImpl.registerPublisher(MasterXmlRpcEndpointImpl.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.invoke(ReflectiveXmlRpcHandler.java:115)
    at org.apache.xmlrpc.server.ReflectiveXmlRpcHandler.execute(ReflectiveXmlRpcHandler.java:106)
    at org.apache.xmlrpc.server ...
(more)
edit retag flag offensive close merge delete

Comments

I am unable to reproduce the problem since building jroscore already fails for me. I checked out jroscore and called "./gradlew installApp" which resulted in "Could not find property 'install' on root project 'jroscore'.". Any idea how to fix that?

Dirk Thomas gravatar image Dirk Thomas  ( 2014-01-21 14:15:27 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-01-08 07:48:00 -0500

tulku gravatar image

updated 2014-01-10 06:59:28 -0500

Hi Jarda!

We are seeing the same problem when mixing the Java master and C++ nodes.

Were you able to fix this? Any help would be appreciated!

EDIT: We have been digging into this issue, and actually found two bugs in roscpp that are involved in this problem. We reported both of them and actually hacked the Apache XML library to workaround the roscpp issues.

The bugs were reported in /ros/ros_comm repo issue #335 and #334. (I can't paste links, sorry!)

Regards, Lucas

edit flag offensive delete link more

Comments

1

These issues have been fixed, long time ago. This question should be marked as answered.

tulku gravatar image tulku  ( 2014-09-09 16:10:16 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-10-02 01:16:23 -0500

Seen: 582 times

Last updated: Jan 10 '14