有关如何在某些ROS包中集成Qt的任何示例?

时间:2013-12-02 02:57:27

标签: qt cmake

我想将QT用作移动平台的用户界面。我有一个传感器包,包括IMU,激光,Kinect和车轮编码器。想要一个运行玫瑰节点的输入按钮,而不是对数据进行操作,并给出输出结果。我被告知应该像任何其他Qt + CMake项目一样设置。

我使用了简单的例子

  #include "QDebug"
    #include "ros/ros.h"

    int main(int argc, char** argv)
    {
      ros::init(argc, argv, "Qt_test");
      qDebug()<<"Hello world";
        return 0;
    }


Than successfuly made the CmakeList file. I could compile it with make. But when I tried to run it  with `./test_qt` I got this error

    bash: ./test_qt: No such file or directory

帮助 感谢

1 个答案:

答案 0 :(得分:0)

您必须使用像http://wiki.ros.org/qt_tutorials?distro=hydro这样的软件包。 并使用cmake构建您的项目。如果您想使用qtcreator,您必须通过命令行调用ide。但之前,你的bash必须知道ROS安装的路径。

1 - 在你的bash中输入:source devel.setup.bash 2 - 在catkin工作区中创建qtRos节点/包。 3 - 在命令行中调用qtcreator