ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

GUI noob - no prior experience with Qt or Rqt

asked 2015-04-23 13:07:23 -0500

voladoddi gravatar image
  • Problem Statement:

I have a USB camera stream and I can view these images multiple ways. But now, I have to create a GUI with say an image window that is streaming these images on a node "" and has some control options available to the user.

  • Example Scenario:

image description

I can see three buttons, and I need to do this :

   onClick(Button1): Display Image1 on ImageWindow
   onClick(Button2): Display Image2 on ImageWindow
   onClick(Button3): Display Image3 on ImageWindow

How do I go about creating this GUI? I don't need an exclusive code, but any/all links to well-documented tutorials is terribly appreciated. I actually went over to rqt/tutorials page but found it a little overwhelming.

Posting here in the hope that I get out of noob status and other noobs can benefit from constructive answers as well.

edit retag flag offensive close merge delete


No takers?

voladoddi gravatar image voladoddi  ( 2015-04-24 10:59:20 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2015-04-24 12:18:10 -0500

Dirk Thomas gravatar image

updated 2015-04-25 01:45:30 -0500

If you want to use image_transport for your video data you must use C++ since there is no equivalent in Python at the moment.

You can create your own rqt plugin by following the tutorials and looking at the code of other plugins. If the existing documentation for that seems to be too overwhelming you might want to start with some beginner tutorials on ROS before.

For your specific goal it would make sense to reuse some of the code of the rqt_image_view plugin.


rqt is built on the gui toolkit Qt. You will find a lot of documentation about Qt itself which is not covered in the ROS wiki:

edit flag offensive delete link more


Hi @dirk-thomas, my problem is not in understanding ROS, but the UI part of it.

for example, mentions several terms like "widgets", "signals/slots", "threads" that do not as of yet make sense to me.

voladoddi gravatar image voladoddi  ( 2015-04-24 18:25:27 -0500 )edit

However, thanks for the rqt_image_view plugin link. Maybe I should use the existing plugin, modify a few things there and then visualize how they look.

voladoddi gravatar image voladoddi  ( 2015-04-24 18:26:44 -0500 )edit

answered 2018-12-18 01:29:19 -0500

pavankumarbn gravatar image

updated 2018-12-24 01:01:51 -0500

  1. $ sudo apt-get install qt-sdk - to install QT
  2. $ sudo apt-get install python-qt4 pyqt4-dev-tools - to install Python bindings for Qt cross-platform

After 1 and 2, Create required UI using QtCreater.

  1. $ pyuic4 -x filename.ui -o

  2. In integrate ROS code to interact with respect to UI Clicks

Follow this Tutorial series

edit flag offensive delete link more


Please don't post link-only answers, this leaves the answer to be not self-contained (also seems a little spammy too tbh as you've post the exact same answer to multiple questions). Please update your answer with the all of the relevant information to answer the question.

jayess gravatar image jayess  ( 2018-12-18 05:59:04 -0500 )edit

Thank you for the guidance. I have updated the answers.

pavankumarbn gravatar image pavankumarbn  ( 2018-12-24 01:01:38 -0500 )edit

Question Tools



Asked: 2015-04-23 13:07:23 -0500

Seen: 2,152 times

Last updated: Dec 24 '18