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

Revision history [back]

click to hide/show revision 1
initial version

It looks like your hostname is ubuntu, and when your PC doesn't have a network connection configured, it can't ping itself (or create loopback connections to itself). This is probably because (1) there is no loopback network adapter or (2) there is no host entry to identify ubuntu as the local IP address. Try these steps:

  1. Ensure that you have the loopback network adapter set up. In a terminal, run ifconfig, which will print information about all of your network adapters. Make sure there is an entry for lo. It should look something like this:

    lo    Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:76611664 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76611664 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:4619547412 (4.6 GB)  TX bytes:4619547412 (4.6 GB)
    

    If you don't see an entry for lo, edit /etc/network/interfaces (you'll need to use sudo) and add these lines to configure the loopback adapter:

    auto lo
    iface lo inet loopback
    

    Then, save the file and restart your computer.

  2. If step 1 doesn' fix the problem, it might be that your computer isn't finding an IP address for its own hostname. Make sure that /etc/hosts includes a line like this:

     127.0.1.1  ubuntu
    

    If it isn't there, add it. (You'll need to use sudo to edit this file as well.)