roscore运行报错Unable to contact my own server

  大概几天没有运行ROS了,今天运行一下出现以下错误,在此记录一下

zztsj@tsj:~$ roscore
... logging to /home/zztsj/.ros/log/3455db8a-1536-11eb-9296-9822efa1466f/roslaunch-tsj-8025.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

RLException: Unable to contact my own server at [http://tsj:40035/].
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 tsj                                                                          
                                                                                          
For more tips, please see                                                                 
                                                                                          
        http://wiki.ros.org/ROS/NetworkSetup                                              
                                                                                          
The traceback for the exception was written to the log file      

 

解决方法如下:

进入到配置文件

vim ~/.bashrc

加入以下两段代码

1  export ROS_HOSTNAME=localhost
2 export ROS_MASTER_URI=http://localhost:11311

更新环境变量

source ~/.bashrc

就顺利解决了,再次启动就可以正常的跑起来了。

可到官网去查找方法:http://wiki.ros.org/ROS/NetworkSetup

 

 



 

posted @ 2020-10-23 21:32  拼命的骡子  阅读(2795)  评论(0编辑  收藏  举报