roscore报错Unable to contact my own server at the network is not configured procause is that the machi

问题描述

在终端运行roscore的时候,会运行不起来,出现如下错误:

jetbot@destop:~$ roscore
... logging to /home/jetbot/.ros/log/3379ba1e-0039-11ea-8c79-1831bf6e1a36/roslaunch-destop-5954.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://destop:33221/].
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 destop

For more tips, please see

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

The traceback for the exception was written to the log file

解决办法:

1) 观察/etc/hosts

看下该文件是否曾经被修改过,你可能修改过它用于多机通信,将其再次修改为如下形式,第二行"desktop"要修改为你的电脑名字.

127.0.0.1   localhost
127.0.0.1   desktop
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

2) 观察 ~/.bashrc

观察下.bashrc是否被修改了,如被修改了,要改为如下形式:

$ sudo gedit ~/.bashrc
export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311

最后,使其生效.

source ~/.bashrc

3) 测试

再次启动一个新的终端.注意必须是新终端才生效的.

$ roscore

成功的话会看到熟悉的画面:

jetbot@destop:~$ roscore
... logging to /home/jetbot/.ros/log/84cb70f6-0039-11ea-8c79-1831bf6e1a36/roslaunch-destop-6263.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://localhost:35579/
ros_comm version 1.12.14


SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES

auto-starting new master
process[master]: started with pid [6273]
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值