ROS 中的错误Done checking log file disk usage. Usage is <1GB.

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

1.错误

siat@ubuntu:~$ roscore
... logging to /home/siat/.ros/log/f973aef0-3ff4-11e5-a30c-28d244c5bb27/roslaunch-ubuntu-11487.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://192.168.1.104:54385/].
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 192.168.1.104

For more tips, please see

    http://www.ros.org/wiki/ROS/NetworkSetup

2.原因:多次将source命令和export命令写进bashrc文件

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
source /opt/ros/kinetic/setup.bash
source ~/racecar/devel/setup.bash
source ~/catkin_ws/devel/setup.ba

3.解决办法:

3.1 打开bashrc文件,将最后几行修改如下。
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
source /opt/ros/kinetic/setup.bash
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/home/sz/catkin_ws/src
export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311
#source ~/racecar/devel/setup.bash
3.2 保存并关闭此文件,然后重新打开终端运行roscore即可。
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐