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

QT4 gui interface

asked 2012-04-01 19:41:40 -0600

opcode gravatar image

updated 2014-01-28 17:11:50 -0600

ngrennan gravatar image

Hi the past few days I've been trying to make a simple gui using Qt4 to send a msg when pressing a button and to receive an int value from a topic and display it on a label or something.

I have successfully built the qt gui using rosmake as a standalone program but i dont know exactly which steps to take to integrate a ros node in the gui.

I looked through all the tutorials(eros qt and wiki) you have here and most questions. The eros examples do provide an idea but no luck with making it work.

Does anyone have any ideas, sample code or steps needed to combine a qt app along with ros node.

Thanks in advance!

edit retag flag offensive close merge delete

Comments

Hi I wont to try the same. please can you tell me the steps you need to combine qt app with ros node? I could compile it with make. But I dont know how to run it? When i run it with ./qfoo it gives me bash: ./qfoo: No such file or directory

Astronaut gravatar image Astronaut  ( 2013-12-01 19:00:53 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-04-02 04:45:42 -0600

opcode gravatar image

To answer my own question. I overlooked one of the tutorials.

I just typed: " rosrun qt_create roscreate-qt-pkg qfoo "

That finally gives a clean working node with a gui!!

edit flag offensive delete link more

Comments

How do you run the qfoo package??

Astronaut gravatar image Astronaut  ( 2013-12-01 19:53:09 -0600 )edit
0

answered 2018-12-18 01:36:52 -0600

pavankumarbn gravatar image

updated 2018-12-24 01:02:08 -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 image jayess  ( 2018-12-18 05:58:30 -0600 )edit

Thank you! I have updated the answer

pavankumarbn gravatar image pavankumarbn  ( 2018-12-24 01:02:19 -0600 )edit

Question Tools

Stats

Asked: 2012-04-01 19:41:40 -0600

Seen: 844 times

Last updated: Dec 24 '18