Giter Club home page Giter Club logo

Comments (8)

traversaro avatar traversaro commented on May 29, 2024

To investigate a bit the issue, I launched gzserver --verbose running C:\opt\rosdeps\x64\share\gazebo-9\setup.bat after C:\opt\ros\melodic\x64\setup.bat, without setting GAZEBO_IP. The output that I get is:

C:\Users\STraversaro\source>gzserver --verbose
Gazebo multi-robot simulator, version 9.5.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 169.254.220.186

Note that 169.254.220.186 is not a valid IP for any network interface of my laptop, at least according to the ipconfig output:

C:\Users\STraversaro\source>ipconfig

Windows IP Configuration


Wireless LAN adapter Local Area Connection* 11:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . : homenet.telecomitalia.it
   Link-local IPv6 Address . . . . . : fe80::4fc:3eae:97f2:440a%2
   IPv4 Address. . . . . . . . . . . : 192.168.1.44
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

Ethernet adapter Bluetooth Network Connection 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Connection-specific DNS Suffix  . :
   IPv6 Address. . . . . . . . . . . : 2001:0:5ef5:79fd:1833:23e5:b0e1:d102
   Link-local IPv6 Address . . . . . : fe80::1833:23e5:b0e1:d102%5
   Default Gateway . . . . . . . . . : ::

C:\Users\STraversaro\source>

Interestingly, a similar issue was analyized by @jbohren-hbr when tryng to run Gazebo on WSL, see microsoft/WSL#3368 (comment) and microsoft/WSL#3368 (comment). Based on his analysis, I guess something is going wrong for some reason around this call to GetAdaptersAddresses in https://bitbucket.org/seanyen-msft/gazebo/src/7eb033b4c8f891a9385fe2e50ba2db0310077fe9/gazebo/transport/Connection.cc?at=gazebo9_9.5.0_windows&fileviewer=file-view-default#Connection.cc-810 .

from rosonwindows.

traversaro avatar traversaro commented on May 29, 2024

If I understand correctly from a quick internet search (I am not 100% sure), apparently 169.254.*.* addresses are actualy part of APIPA support in Windows ( https://wiki.wireshark.org/APIPA and http://packetlife.net/blog/2008/sep/24/169-254-0-0-addresses-explained/ ), and so they are assigned to adapters that are listed as "Media disconnected" in ipconfig. So the problem is just in Gazebo logic to find the IP of the adapter, and so it is affecting in the same way regular Windows and WSL.

from rosonwindows.

traversaro avatar traversaro commented on May 29, 2024

and so they are assigned to adapters that are listed as "Media disconnected" in ipconfig.

I am not completly sure on that, to be honest. I saw around ( http://www.tomshardware.co.uk/answers/id-3420985/media-disconnected-problem.html ) output of ipconfig in which a network adapter assigned to a 169.254.*.* address is explicitly listed, so probably my assumption that "Media disconnected" adapter have a 169.254.*.* address was false.

from rosonwindows.

traversaro avatar traversaro commented on May 29, 2024

As correctly pointed out in the WSL issue, we probably need a fix similar to https://bitbucket.org/osrf/gazebo/pull-requests/3009/adding-check-to-make-sure-automatic/diff but for the Windows part of the code.

from rosonwindows.

traversaro avatar traversaro commented on May 29, 2024

Based on the similar code contained in ignition-transport (https://bitbucket.org/ignitionrobotics/ign-transport/src/f6f581a6852b0eccc8d9e27c398def9f174ca33a/src/NetUtils.cc#lines-292), I guess we should add

        // The interface is not running.
        if (curr->OperStatus != IfOperStatusUp)
          continue;

before this line https://bitbucket.org/seanyen-msft/gazebo/src/7eb033b4c8f891a9385fe2e50ba2db0310077fe9/gazebo/transport/Connection.cc?at=gazebo9_9.5.0_windows&fileviewer=file-view-default#lines-824 .

Related ign-transport commit: https://bitbucket.org/ignitionrobotics/ign-transport/commits/3d7c03da63806fc39c40547175d4069d1f57a693 .

from rosonwindows.

seanyen avatar seanyen commented on May 29, 2024

@traversaro That's an interesting issue. Did you try to use ipconfig /all to see if 169.254.*.* from any adapters?

I am not able to repro this issue on my end, so I cannot verify the fix. But I rebuilt with your suggested change and published the updated Gazebo9 package. You can do choco upgrade gazebo9 -y to refresh the new bits (9.4.1.1901022119). Let me know if it helps.

from rosonwindows.

traversaro avatar traversaro commented on May 29, 2024

@traversaro That's an interesting issue. Did you try to use ipconfig /all to see if 169.254.. from any adapters?

PS C:\Users\STraversaro> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : IITICUBLAP102
   Primary Dns Suffix  . . . . . . . : iit.local
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : iit.local
                                       lan

Wireless LAN adapter Local Area Connection* 11:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
   Physical Address. . . . . . . . . : 9E-B6-D0-F1-44-D7
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . : lan
   Description . . . . . . . . . . . : Killer Wireless-n/a/ac 1535 Wireless Network Adapter
   Physical Address. . . . . . . . . : 9C-B6-D0-F1-44-D7
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : 2001:b07:a96:7ebc:4fc:3eae:97f2:440a(Preferred)
   Temporary IPv6 Address. . . . . . : 2001:b07:a96:7ebc:d5e1:db5c:820b:7a21(Preferred)
   Link-local IPv6 Address . . . . . : fe80::4fc:3eae:97f2:440a%2(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.1.59(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Wednesday, January 2, 2019 9:02:40 PM
   Lease Expires . . . . . . . . . . : Thursday, January 3, 2019 10:02:39 PM
   Default Gateway . . . . . . . . . : fe80::a691:b1ff:fe82:18f%2
                                       192.168.1.254
   DHCP Server . . . . . . . . . . . : 192.168.1.254
   DHCPv6 IAID . . . . . . . . . . . : 429700816
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-21-F3-A8-67-74-DA-38-4A-0B-72
   DNS Servers . . . . . . . . . . . : 2001:b07:a96:7ebc::1
                                       192.168.1.254
   NetBIOS over Tcpip. . . . . . . . : Enabled
   Connection-specific DNS Suffix Search List :
                                       lan

Ethernet adapter Bluetooth Network Connection 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network) #2
   Physical Address. . . . . . . . . : 9C-B6-D0-F1-44-D8
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : 2001:0:5ef5:79fd:103a:128f:a2d5:e7f9(Preferred)
   Link-local IPv6 Address . . . . . : fe80::103a:128f:a2d5:e7f9%5(Preferred)
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 603979776
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-21-F3-A8-67-74-DA-38-4A-0B-72
   NetBIOS over Tcpip. . . . . . . . : Disabled
PS C:\Users\STraversaro>

No trace of 169.254.*.*, but to be honest I am connected to a different Wi-Fi network w.r.t. to two days ago.

I am not able to repro this issue on my end, so I cannot verify the fix. But I rebuilt with your suggested change and published the updated Gazebo9 package. You can do choco upgrade gazebo9 -y to refresh the new bits (9.4.1.1901022119). Let me know if it helps.

The updated binary is working fine (no need to set GAZEBO_IP) and the issue seems to be solved, thanks a lot!

from rosonwindows.

traversaro avatar traversaro commented on May 29, 2024

Upstream Gazebo PR: https://bitbucket.org/osrf/gazebo/pull-requests/3079/in-windows-ignore-disabled-interfaces-in/diff .

from rosonwindows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.