本文主要是介绍【已解决】roscore没反应或roscore cannot run as another roscore/master is already running,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
目录
- 1 问题背景
- 2 问题探索
- 3 问题解决
- 4 告别Bug
1 问题背景
环境:
- Ubuntu20.04
- ROS noetic
现象:
roscore
没反应
roscore cannot run as another roscore/master is already running
2 问题探索
对于roscore
没反应的问题,等待一段时间后出现信息
RLException: Unable to contact my own server at [http://192.168.31.249:46867/].
This usually means that the network is not configured properly.A common cause is that the machine cannot connect to itself. Please check
for errors by running:ping 192.168.31.249For more tips, please seehttp://wiki.ros.org/ROS/NetworkSetupThe traceback for the exception was written to the log file
即运行ping 192.168.31.249
时出错,这表明ROS系统分布式通信失败。而ROS初始化中涉及IP设置的是主从配置,可以参考 ROS从入门到精通8-1:多机器人控制(主从机配置)与launch递归启动,因此终端输入
sudo gedit ~/.bashrc
查找ROS IP配置
终端输入
ifconfig
查看实际IP,将ROS_IP
修正为实际IP地址即可(或直接注释)
对于roscore cannot run as another roscore/master is already running
这个问题,实际上是因为系统已经启动了一个ROS节点,杀掉保持唯一性即可
3 问题解决
-
roscore
没反应解决方案: 将
~/.bashrc
中的ROS_IP
修正为实际IP地址即可 -
roscore cannot run as another roscore/master is already running
解决方案:杀掉已有的ros节点管理器
killall -9 roscore && killall -9 rosmaster
4 告别Bug
本文收录于《告别Bug》专栏,该专栏记录人工智能领域中各类Bug以备复查,文章形式为:问题背景 + 问题探索 + 问题解决,订阅专栏+关注博主后可通过下方名片联系我进入AI技术交流群帮忙解决问题
这篇关于【已解决】roscore没反应或roscore cannot run as another roscore/master is already running的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!