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

Problem configuration with roscore?

asked 2017-08-25 11:24:35 -0500

Luis_Valdez gravatar image

updated 2017-08-25 14:57:21 -0500

jayess gravatar image

Hi, I recently install Ros Kinetic, using the tutorials, but I've seen some troubles while I launch the roscore, because it only launch when I have internet connection.

:~$ roscore
... logging to /home/luigi/.ros/log/8a34264e-89af-11e7-b0b2-3bf20ac5beb2/roslaunch-ubuntu-4007.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.

Unable to contact my own server at [http://ubuntu:36413/].
This usually means that the network is not configured properly.

A common cause is that the machine cannot ping itself.  Please check
for errors by running:

    ping ubuntu

For more tips, please see

The traceback for the exception was written to the log file

**But ,when I get internet conection, there's no problem

:~$ roscore
... logging to /home/luigi/.ros/log/5375e854-89af-11e7-b0b2-3bf20ac5beb2/roslaunch-ubuntu-3860.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://ubuntu:39853/
ros_comm version 1.12.7


 * /rosdistro: kinetic
 * /rosversion: 1.12.7


auto-starting new master
process[master]: started with pid [3871]

setting /run_id to 5375e854-89af-11e7-b0b2-3bf20ac5beb2
process[rosout-1]: started with pid [3884]
started core service [/rosout]
edit retag flag offensive close merge delete


What is the output from printenv | grep ROS? Also, what do you mean by internet connection? Do you mean WiFi or a wired connection?

jayess gravatar image jayess  ( 2017-08-25 14:58:54 -0500 )edit

I edited your question to make it more readable. Using the Preformat Text (101010) button on terminal output and source code makes questions much easier to read and answer.

jayess gravatar image jayess  ( 2017-08-25 14:59:54 -0500 )edit

:~$ printenv | grep ROS ROS_ROOT=/opt/ros/kinetic/share/ros ROS_PACKAGE_PATH=/home/luigi/RoboticsCourses/catkin_ws/src:/opt/ros/kinetic/share ROS_MASTER_URI=http://localhost:11311 ROSLISP_PACKAGE_DIRECTORIES=/home/luigi/RoboticsCourses/catkin_ws/devel/share/common-lisp ROS_DISTRO=kinetic

Luis_Valdez gravatar image Luis_Valdez  ( 2017-08-26 06:14:57 -0500 )edit

thanks, I mean wifi connection.

Luis_Valdez gravatar image Luis_Valdez  ( 2017-08-26 06:17:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-08-25 23:13:15 -0500

Ed Venator gravatar image

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:  Mask:
          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:  ubuntu

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

edit flag offensive delete link more


Thanks Ed !!! Apparently the name of my computer in the hosts file was incorrect, I fixed it and it seems that the roscore works well even without wifi connection Thank you!!

Luis_Valdez gravatar image Luis_Valdez  ( 2017-08-26 06:35:41 -0500 )edit

Question Tools



Asked: 2017-08-25 11:24:35 -0500

Seen: 1,341 times

Last updated: Aug 25 '17