#eclipse下调试ROS工程

问题描述

eclipse输出信息:
ROS_MASTER_URI is not defined in the environment. Either type the following or (preferrably) add this to your ~/.bashrc file in order set up your local machine as a ROS master:

export ROS_MASTER_URI=http://localhost:11311

then, type ‘roscore’ in another shell to actually launch the master program

问题原因

没有添加ROS_MASTER_URI变量

问题解决方法

在eclipse中工程build上鼠标右键点击run as,选中之前创建好的运行节点talker configuration,选中environment,点击new,输入如下图信息并点击Run.
#eclipse下调试ROS工程
#eclipse下调试ROS工程

正确结果:
#eclipse下调试ROS工程