Ask Your Question
3

GUI noob - no prior experience with Qt or Rqt

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

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 "Listener.py" 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

Comments

No takers?

voladoddi gravatar imagevoladoddi ( 2015-04-24 10:59:20 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

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

Dirk Thomas gravatar image

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

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.

Update:

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

Comments

Hi @dirk-thomas, my problem is not in understanding ROS, but the UI part of it. http://wiki.ros.org/rqt/Tutorials/Wri...

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

voladoddi gravatar imagevoladoddi ( 2015-04-24 18:25:27 -0600 )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 imagevoladoddi ( 2015-04-24 18:26:44 -0600 )edit
0

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

pavankumarbn gravatar image

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

  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 filename.py

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

Follow this Tutorial series https://www.youtube.com/watch?v=CNgfM...

edit flag offensive delete link more

Comments

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 imagejayess ( 2018-12-18 05:59:04 -0600 )edit

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

pavankumarbn gravatar imagepavankumarbn ( 2018-12-24 01:01:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 1,430 times

Last updated: Dec 24 '18