如何使用Qtcreator设置环境变量以运行ROS项目



使用Qtcreator运行ROS项目,我得到以下错误:

FATAL] [1473647395.591961066]: ROS_MASTER_URI在环境。键入以下内容,或者(最好)将其添加到你的~/。bashrc文件,以便将本地机器设置为ROSmaster: export ROS_MASTER_URI=http://localhost:11311'roscore'在另一个shell中实际启动主程序。

设置您的ROS环境,就像您通常在.bashrc中做的那样,并简单地从终端启动Qt Creator。就是这样。,)这将使您的ROS变量对IDE可见。

我相信每次从终端运行QtCreator并不是一个好主意。你可能会有一次忘记它,这将是一个怪胎秀(它曾经有效!!)。

所以,我建议看一下下面的页面,解释如何一劳永逸地为ROS设置Qt Creator。

> Note that instead of starting QtCreator from a terminal, you can use the following desktop file and use it in your launcher:
$ cat qtcreator.desktop  
[Desktop Entry] 
Exec=bash -i -c qtcreator %F
Icon=qtcreator 
Type=Application 
Terminal=false 
Name=Qt Creator
GenericName=Integrated Development Environment 
MimeType=text/x-c++src;text/x-c++hdr;text/x-xsrc;application/x-designer;application/vnd.nokia.qt.qmakeprofile;application/vnd.nokia.xml.qt.resource;
Categories=Qt;Development;IDE; 
InitialPreference=9
> In Ubuntu 13.04 and later, the third line must read:
Icon=QtProject-qtcreator

最新更新