Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robot os no longer working on insider build #2560

Closed
rowanG077 opened this issue Oct 11, 2017 · 5 comments
Closed

Robot os no longer working on insider build #2560

rowanG077 opened this issue Oct 11, 2017 · 5 comments

Comments

@rowanG077
Copy link

rowanG077 commented Oct 11, 2017

Robot OS on WSL was working for me on the stable windows version.

Microsoft Windows [Version 10.0.15063]

Today I upgraded to windows insider and now the publish subscribe system is no longer working.

My current windows version:

Microsoft Windows [Version 10.0.16299.15]

roswtf errors with the message The following nodes should be connected but aren't.

The output was recorded while running one of the examples. In the following order:

  1. Terminal was running roscore.
  2. One terminal was running the command: "rosrun turtlesim turtlesim_node". This succesfully launches a window with a turtle in it.
  3. The last terminal was running the command "rosrun turtlesim turtle_teleop_key". This launches the app succesfully but no matter what keys are pressed nothing happens.

An interesting thing to note is that running turtle_teleop_key and once that is started running turtlesim_node will work. I can then move the turtle using the keys.

Calling the clear service works in the later case also but I can't verify in the failing case.

Here is the roswtf output for the first case.

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

Online checks summary:

Found 1 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING The following nodes are unexpectedly connected:
 * unknown (http://DESKTOP-5KR77SI:50230/)->/rosout (/rosout)


Found 1 error(s).

ERROR The following nodes should be connected but aren't:
 * /teleop_turtle->/turtlesim (/turtle1/cmd_vel)
 * /teleop_turtle->/rosout (/rosout)
 * /turtlesim->/rosout (/rosout)

and the second working case:

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

Online checks summary:

Found 1 warning(s).
Warnings are things that may be just fine, but are sometimes at fault

WARNING The following nodes are unexpectedly connected:
 * unknown (http://DESKTOP-5KR77SI:50230/)->/rosout (/rosout)


Found 1 error(s).

ERROR The following nodes should be connected but aren't:
 * /teleop_turtle->/rosout (/rosout)
 * /turtlesim->/rosout (/rosout)

I can attach strace files if necessary but since this there was allready specific work on ros as I can tell from this issue: #1450 I don't think it is necessary. They are rather large...

Roscore output:

... logging to /root/.ros/log/3533c16a-ae92-11e7-bd23-bc8385db5709/roslaunch-DESKTOP-5KR77SI-12375.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://DESKTOP-5KR77SI:50203/
ros_comm version 1.13.2


SUMMARY
========

PARAMETERS
 * /rosdistro: lunar
 * /rosversion: 1.13.2

NODES

auto-starting new master
process[master]: started with pid [12386]
ROS_MASTER_URI=http://DESKTOP-5KR77SI:11311/

setting /run_id to 3533c16a-ae92-11e7-bd23-bc8385db5709
process[rosout-1]: started with pid [12399]
started core service [/rosout]
@Yay295
Copy link

Yay295 commented Oct 18, 2017

I can confirm this issue. I also checked ROS's log file and there are no errors listed there. However, I had a different issue with ROS before the update that I was able to solve by changing the function

def close_half_closed_sockets():
    for proxy in _proxies.values():
        transport = proxy("transport")
        if transport._connection and transport._connection[1] is not None and transport._connection[1].sock is not None:
            state = transport._connection[1].sock.getsockopt(socket.SOL_TCP, socket.TCP_INFO)
            if state == 8:  # CLOSE_WAIT
                transport.close()

in /opt/ros/lunar/lib/python2.7/dist-packages/rosmaster/util.py to immediately return, and that solved this issue for me as well. I found this solution because the other error I had did show up in the log file, so I was able to track the cause. The specific line that causes the issue is ...getsockopt(socket.SOL_TCP, socket.TCP_INFO), which previously failed with an error. I'm guessing this option has been stubbed out (though I don't see it in the logs) so it doesn't error now, but it still doesn't work.

This is obviously not a great solution though, because I've prevented ROS from cleaning up some of its sockets.

This is possibly related to issue #1982.

@sunilmut
Copy link
Member

@Yay295 - What did you stub to get this work? Do you know the root cause? From your post above, it doesn't sound like TCP_INFO was causing the failure.

@Yay295
Copy link

Yay295 commented Oct 30, 2017

I think I may have been looking in the wrong place before, because I have found the error message now.

Using ROS Lunar version 1.13.2 and the steps in the original post I found this

[rosmaster.threadpool][ERROR] 2017-10-30 14:35:11,066: Traceback (most recent call last):
  File "/opt/ros/lunar/lib/python2.7/dist-packages/rosmaster/threadpool.py", line 218, in run
    result = cmd(*args)
  File "/opt/ros/lunar/lib/python2.7/dist-packages/rosmaster/master_api.py", line 210, in publisher_update_task
    ret = xmlrpcapi(api).publisherUpdate('/master', topic, pub_uris)
  File "/opt/ros/lunar/lib/python2.7/dist-packages/rosmaster/util.py", line 67, in xmlrpcapi
    close_half_closed_sockets()
  File "/opt/ros/lunar/lib/python2.7/dist-packages/rosmaster/util.py", line 76, in close_half_closed_sockets
    state = transport._connection[1].sock.getsockopt(socket.SOL_TCP, socket.TCP_INFO)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 92] Protocol not available

in /.ros/log/latest/master.log.

@sunilmut
Copy link
Member

sunilmut commented Oct 30, 2017

@Yay295 - Great, thanks. Are you able to stub out the call to getsockopt(TCP_INFO) and see if that resolves the issue? Not suggesting that for proper fix, but, just for information. If so, then we can definitely mark this dupe of #1982. Also, TCP_INFO is our backlog.

@Yay295
Copy link

Yay295 commented Oct 31, 2017

No, getsockopt is a read-only method on Python's built-in socket class. This does seem like a duplicate of that issue though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants