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

Using ROS to create a GUI

asked 2022-03-31 12:04:05 -0600

Mix_MicDev gravatar image

Hi, my name is Michel, i’m a student and I’ve been creating robots since I’m 15. I’m actually knew to ROS and it’s variety of tools, and I would like to know if there is an easy way to setup a graphical user interface (GUI) for my project:

The project consits of a Raspberry Pi attached to an LCD Touch Screen, the RPi is connected to pressure sensors and reads the values each second… My problem is that I want to display a GUI on the LCD screen so that the user can read the sensor values in a table, as well as end the program whenever he wants. I tried using python TKinter to do it, but I think it’s a bit complicated since the main loop is constantly waiting for an “event” to happen (user interaction) thus not paying attention to sensor data coming up… Is there an easier way to do it? I mean it’s a very basic operation (print data on GUI and wait for Stop button) and I wondered maybe there’s a tool in ROS that could help me?

Thanks in advance, Michel

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2022-04-03 06:12:56 -0600

Hi,

I was doing something similar few years ago and we decided to create an rqt plugin specifically for our robot/need where we can display data and provide input buttons for user. This would enable you to use also more advanced visualizations like rviz.

If your robot/device is running ros, rqt plugins are very convenient solution.

edit flag offensive delete link more

Comments

Thanks a lot for your answer! So you suggest creating a ui file with QT creator, and then converting it to an rqt_plugin? Is it possible to do this process using Python rather than c++ ?

Mix_MicDev gravatar image Mix_MicDev  ( 2022-04-04 16:48:19 -0600 )edit

I don’t think you have to do anything with qt creator. Simply create an rqt plugin based on examples.

If you want to do this with rqt, I think it is C++ only

destogl gravatar image destogl  ( 2022-04-10 04:30:48 -0600 )edit

Great, thanks! Do you recommend a specific tutorial for beginners?

Mix_MicDev gravatar image Mix_MicDev  ( 2022-04-11 06:39:21 -0600 )edit
1

Great, thank you very much!!

Mix_MicDev gravatar image Mix_MicDev  ( 2022-04-13 09:50:54 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2022-03-31 12:04:05 -0600

Seen: 600 times

Last updated: Apr 03 '22