Code Monkey home page Code Monkey logo

ros_qt_gui's Introduction

Author

  • Welin 2018.02.23
  • modified in 2018.10.31
  • update in 2021.10.14

Overview

In the project, so many ways are provided to implement ROS-Qt GUI, namely rqt, such as qt4, qt5, pyqt4. Also ROS could be treated as a open-source library to extend some other module by using CMAKE, not just using catkin_make/rosbuild, to make the development more flexible.

Description

  • In this project, three approaches are provided to implement ROS&Qt GUI and another two projects for PyQt GUI.
  • In the test_gui package, it just modified the example in catkin_create_qt_pkg depending on qt_build using Qt4 library.
  • In the rqt_mypkg package, it is the C++ rqt_plugin test depending on rqt_gui_cpp.
  • In the qt_ros_test package, it combines ROS with Qt5 library.

Remeber to add Qt install environment to the CMAKE_PRFIX_PATH such as set(Qt5_DIR "path/to/cmake/Qt5") before find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets) if you encounter the following problem.

ROS_QT_GUI

The above three are written in C++ programmer. The following two below are written in Python.

  • In the ros_pyqt package, it uses PyQt (PyQt4) to implement the GUI.
  • In the pyqt_gui package, it uses PyQt and python_qt_binding to implement the GUI.

In the qt4rosgui package, it uses Qt4 libraries to implement the ROS-GUI NOT depends on qt-ros package (namely command catkin_create_qt_pkg).

In the librviz_test package, it uses librviz to build a visualizer tool for display using Qt4.

For more complicated examples, please see the package dyn_cfg_gui or ros_cv_gui, it is the implementation for rqt_reconfigure and some image processing by using OpenCV and Qt5. Also see ROS_dynamic_reconfig, ros_cv_qt_gui and ros_opencv_pro for detail.

TODO

    $ mkdir -p catkin_ws/src
    $ cd catkin_ws/src

git clone the project from the corrent URL

    $ cd ..
    $ catkin_make
    $ source devel/setup.bash

Then, rosrun test_gui test_gui or rosrun qt_ros_test qt_ros_test_node or rosrun qt4rosgui qt4rosgui_node. The effect is below:

ROS_QT_GUI

To run the rqt_mypkg, just open rqt (rosrun rqt_gui rqt_gui), and the "rqt first C++ plugin" could be found in the Plugins menu. The effect is below:

ROS_QT_GUI

To run ros_pyqt or pyqt_gui, just using the command python ros_pyqt or python pyqt_gui. The effect is below:

ROS_QT_GUI

If you have a mobile robot such as TurtleBot or else, the slam navigation status could be shown as below. Just run ros vizlib_test vizlib_test_node.

ROS_QT_GUI

Using rosrun dyn_cfg_gui dyn_cfg_gui command, the effect is shown below.

ROS_QT_GUI

The ros&opencv example is also provided as shown below.

    $ rosrun ros_cv_gui ros_cv_gui_node

ROS_QT_GUI

Especially,

the ros_cmake package could be separated in a individual directory, not using catkin_make/rosbuild.

    $ mkdir build
    $ cd build
    $ cmake ..
    $ make
    $ ./ros_cmake     #the executable program

The effect is shown below, the topic has been subscribed. Remember to open roscore at first.

ROS_QT_GUI

Enjoy!

ros_qt_gui's People

Contributors

welinlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ros_qt_gui's Issues

Qt的connect问题

Qt的connect最后有个参数决定着SLOT在哪个线程执行,不知道您有没有注意到?像dyn_cfg_gui/src/dyn_cfg_gui.cpp这里,SLOT将在主线程执行。您的设计思路是子线程只执行ROS的事件循环ros::spinOnce();吗?

Using ROS_QT_GUI in ROS Melodic

when running catkin_make on ROS melodic. a dependecy qt-build is missing which does not exist for ROS Melodic. Any workaround?

Could not find roscpp

Hi, thanks for your summary, it's very helpful.
Stand alone "ros_cmake" is what I am interested in. However, there's one problem when I configured the QtCreator environment. All the steps are instructed by ROS IDE wiki, and I also changed the .desktop file to bash the PATH (this fix catkinConfig.cmake problem). But I still get the error of "Could not find roscpp".
Do you any idea how to fix that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.