大概幾天沒有運行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