admin管理员组

文章数量:1529456

https://blog.csdn/xiaodingqq/article/details/87690563

错误出在运行节点时, 出现原因待定,但是这个错误是本地的会还地址出错了,所以当你发布话题再去接收时,就会收不到

错误提示:

ERROR: unable to contact ROS master at [11311]

The traceback for the exception was written to the log file

 

解决办法:

在终端上,输入以下命令:

export ROS_HOSTNAME=localhost

export ROS_MASTER_URI=http://localhost:11311

如果涉及主从机,则在终端上,输入以下命令:

export ROS_HOSTNAME=本机的IP

export ROS_MASTER_URI=http://ros mater的IP:11311

永久解决:

在终端输入以下命令

vim ~/.bashrc

到文件最下面(底部)添加(更改):

export ROS_MASTER_URI=http://localhost:11311

export ROS_HOSTNAME=localhost

 

本文标签: 连接到错误MasterrosError