1. 程式人生 > >#eclipse下除錯ROS工程

#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.
在這裡插入圖片描述
在這裡插入圖片描述

正確結果:
在這裡插入圖片描述