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

Integrating Existing ROS application with existing QT application

asked 2013-02-17 08:53:06 -0600

newToRos gravatar image

updated 2014-04-20 14:09:41 -0600

ngrennan gravatar image

I have just been added to a fairly large ROS project. My goal is to take data from a ROS topic and display it in a QT application. I have built a working QT application that uses fake data, but I am having trouble integrating it with the ROS side. I am completely new to both ROS and QT. I have read several documents about QT and ROS, but I am having a hard time understanding them. I did manage to get my QT application to compile using a CMakeList instead of QMake, but beyond that I am completely lost. The ROS side is using fuerte and we are using QT4. I am using a pre-built Ubuntu virtual machine from nootrix.

edit retag flag offensive close merge delete



Could you say where exactly you're getting stuck? Without more info or a specific question, it's difficult to offer any suggestions.

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2013-02-17 11:31:18 -0600 )edit

weiin & joq - I did not find a way to post a comment to an answer, but I will definitely try out both of those tonight and post back/accept as soon as I get a chance.

newToRos gravatar image newToRos  ( 2013-02-18 03:16:36 -0600 )edit

Dan - I currently have two separate sets of source code. I am having trouble figuring out how to merge the code so that I can use the data from a topic in my QT application.

newToRos gravatar image newToRos  ( 2013-02-18 03:18:36 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-17 13:07:18 -0600

weiin gravatar image

Have you looked at the qt-ros tutorials? The code structure is quite straightforward and separates the gui portion from the ros node portion. Since you already have the gui portion, I suppose you can just add in qnode.cpp and link them with signals and slots.

edit flag offensive delete link more


You may also find helpful as a framework for integrating various QT GUI elements.

joq gravatar image joq  ( 2013-02-17 17:00:27 -0600 )edit

I can now post comments to answers... I had actually looked at qt-ros and it does seem very straightforward, but I could never run it. I did the command "rosrun qt_create roscreate-qt-pkg qdude", but I got a "No rule to make target" error when I tried to make it. I ran cmake again, but no luck.

newToRos gravatar image newToRos  ( 2013-02-18 06:44:46 -0600 )edit

I figured out the "No rule to make target" error. It was a stupid mistake on my part. I had created a folder name with a space in it and that threw off all the directories. I am testing it out now, but this looks like exactly what I was looking for.

newToRos gravatar image newToRos  ( 2013-02-18 08:41:35 -0600 )edit

Thank you again for all of your help. qt-ros worked perfectly. I did not have to make any major changes to my existing QT app and the code can stay in a separate directory from my ROS files.

newToRos gravatar image newToRos  ( 2013-02-20 08:41:59 -0600 )edit

How can I add in qnode.cpp?? Every time I try to revise code, it seems unchanged. Especially for ui.

Bo Hyeon gravatar image Bo Hyeon  ( 2014-01-28 21:25:08 -0600 )edit

Question Tools


Asked: 2013-02-17 08:53:06 -0600

Seen: 2,267 times

Last updated: Feb 17 '13