Ask Your Question
0

roswtf communcation error bug in Ubuntu 11.04

asked 2011-08-01 19:22:21 -0600

kluessi gravatar image

Hi there,

I am using ros-diamondback on Ubuntu 11.04-64bit.

I am launching the following launch file:

<launch>
     <node pkg="tf type="static_transform_publisher" name="blub" args ="0 0 0 0 0 0 blub blub2 100" />
</launch>

In another terminal I run roswtf

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...
... done running graph rules
running tf checks, this will take a second...
... tf checks complete

Online checks summary:

Found 2 error(s).

ERROR Communication with [/blub] raised an error: 
ERROR Communication with [/rosout] raised an error:

I tried to set ROS_IP and ROS_HOSTNAME by hand, but still the same error. The funny thing is, that there is no error. Everything works as expected. I can listen to the tf topic and receive data.

Can anybody tell me, why roswtf thinks that there is an error?

Thx

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2011-09-02 11:01:04 -0600

kwc gravatar image

No activity in > 1 month, closing

edit flag offensive delete link more
0

answered 2011-08-02 08:41:49 -0600

kwc gravatar image

updated 2011-08-03 05:49:01 -0600

Can you try running the following script? (save to check.py, run "python check.py")

import time
import xmlrpclib
import socket
import traceback
import roslib.scriptutil
from ros import rosnode

def check(n):
    master = roslib.scriptutil.get_master()
    try:
        socket.setdefaulttimeout(3.0)
        node_api = rosnode.get_api_uri(master, n)
        if not node_api:
            print "Master does not have lookup information for node [%s]"%n
            return

        node = xmlrpclib.ServerProxy(node_api)
        start = time.time()
        socket.setdefaulttimeout(3.0)
        code, msg, bus_info = node.getBusInfo('/roswtf')
        end = time.time()
        if (end-start) > 1.:
            print "Communication with node [%s] is very slow"%n
        if code != 1:
            print "Node [%s] would not return bus info"%n
        print "[%s] ok"%(n)
    except socket.error, e:
        pass #ignore as we have rules to catch this
    except Exception, e:
        traceback.print_exc()

check('/rosout')
check('/blub')

Update: patch to apply to roswtf/src/roswtf/graph.py to get more debugging information:

Index: graph.py
===================================================================
--- graph.py    (revision 14535)
+++ graph.py    (working copy)
@@ -304,6 +304,8 @@
         except socket.error, e:
             pass #ignore as we have rules to catch this
         except Exception, e:
+            import traceback
+            traceback.print_exc()
             ctx.errors.append(WtfError("Communication with [%s] raised an error: %s"%(n, str(e))))
         finally:
             self.done = True
edit flag offensive delete link more
0

answered 2011-08-02 19:03:51 -0600

kluessi gravatar image

Hi,

here the output of your script:

[/rosout] ok
[/blub] ok
edit flag offensive delete link more

Comments

please use the comment feature instead of posting answers to your question. the above output indicates that things should be working fine, so I'm a bit stumped. I've updated my previous answer with a patch you can apply to roswtf/src/roswtf/graph.py, which should give a traceback from roswtf
kwc gravatar imagekwc ( 2011-08-03 05:48:33 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-08-01 19:22:21 -0600

Seen: 367 times

Last updated: Sep 02 '11