0
$\begingroup$

Rosanswers logo

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.


Originally posted by newToRos on ROS Answers with karma: 52 on 2013-02-17

Post score: 0


Original comments

Comment by Dan Lazewatsky on 2013-02-17:
Could you say where exactly you're getting stuck? Without more info or a specific question, it's difficult to offer any suggestions.

Comment by newToRos on 2013-02-18:
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.

Comment by newToRos on 2013-02-18:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by weiin with karma: 2268 on 2013-02-17

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by joq on 2013-02-17:
You may also find http://ros.org/wiki/rqt helpful as a framework for integrating various QT GUI elements.

Comment by newToRos on 2013-02-18:
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.

Comment by newToRos on 2013-02-18:
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.

Comment by newToRos on 2013-02-20:
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.

Comment by Bo Hyeon on 2014-01-28:
How can I add in qnode.cpp?? Every time I try to revise code, it seems unchanged. Especially for ui.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.