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

 

 



 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM