(ros/qt报错) FATAL: ROS_MASTER_URI is not defined in the environment
2015-12-24 16:02
591 查看
安装qt之后,明明打开roscore但是qt运行跟ros有关的节点时报错:
[FATAL] [1450943695.306401842]: 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.
主要原因是因为没有从bash里面启动qt,所以qt的环境变量里面没有ros的变量环境.
解决办法,主要是从bash中启动qt,根本原因是要在ros环境变量执行之后再执行qt
我的解决办法是在.bashrc中添加如下语句
设置了别名,每次启动qt从终端中启动qt,这样就能确保环境变量正确
author: wsh
email: tongzhuodenilove@163.com
[FATAL] [1450943695.306401842]: 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.
主要原因是因为没有从bash里面启动qt,所以qt的环境变量里面没有ros的变量环境.
解决办法,主要是从bash中启动qt,根本原因是要在ros环境变量执行之后再执行qt
我的解决办法是在.bashrc中添加如下语句
alias qt=/opt/Qt5/Tools/QtCreator/bin/qtcreator
设置了别名,每次启动qt从终端中启动qt,这样就能确保环境变量正确
author: wsh
email: tongzhuodenilove@163.com
相关文章推荐
- qt 开发ios应用
- QT qthread详解
- qtp常用方法
- Qt下载地址
- 用Qt获取本机IP
- QFileDialog、QColorDialog中英文提示信息翻译方法
- Qt之QThread详解
- qt中qmake与ros结合
- QT环境问题
- Qt写的文件拆分和融合小工具
- vs2013中配置Qt的方法以及使用感受。
- qt 5.5.1 连接 mysql 5.7.9
- Qt学习之路(10):自定义事件与事件控制的5大层次
- Qt SDK的x64与x86版本以及与VS的配合
- Qt多线程编程
- 我的QT5学习之路(四)——信号槽
- 使用Qwt绘制历史曲线
- Qt学习之路(9):事件过滤器
- Qt之自定义属性Q_PROPERTY
- QT连接MYSQL数据库