Ask Your Question
2

qt creator and ROS

asked 2011-04-12 04:00:49 -0500

updated 2014-01-28 17:09:31 -0500

ngrennan gravatar image

I have a qt creator .pro file from which my makefile is generated, however now I want to include ROS packages in the project and have my project build in a rosmake kind of way of from the build command in QT Creator. In the project I also make use of a QT designer .ui file. Is there a script/tutorial how to use ROS together with QT? It's not mentioned on the IDE page. I found an old discussion here, but this consists out of modifying the CMake file, it isn't a portable solution.

edit retag flag offensive close delete

Comments

CMake will probably be the most useful solution. Why do you think this is not portable? CMake comes with full support for Qt, so if you wrap qmake it will all work fine. AHornung ( 2011-04-12 07:59:02 -0500 )edit
1
Okay, so I've got a .pro file and a makefile from a qmake and a ros manifest + cmakelist file from a ros package and how do I continue from there on? KoenBuys ( 2011-04-12 09:31:52 -0500 )edit
This probably qualifies more for an answer, so I'll give it a try... AHornung ( 2011-04-12 09:46:43 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2011-04-12 13:15:10 -0500

Daniel Stonier gravatar image

updated 2011-04-12 13:19:37 -0500

Switching to qt-cmake development is the easiest way as that directly syncs with the way ros builds. The qt cmake module maintainer I've found is also very accessible to addressing problems whatever may arise (I had a few issues with mingw+qt).

Eros (nevermind that its about embedded/cross compiling) has a few python tools to help set up qt projects in the ros-cmake environment. You can either install eros or use these as a guide for your own packages.

The templates set up ui files and resources as well as sources. This tutorial gives you a picture of the end result (though as mentioned at the bottom, works just as well natively without doing all of the rostoolchain stuff.

For portablility, we're hoping that rosbuild2 (coming soon) will mean that this can be directly compiled via cmake on windows' msvc as well.

edit flag offensive delete publish link more
2

answered 2011-04-12 09:52:32 -0500

updated 2011-04-12 09:55:37 -0500

Have a look at the discussion thread you linked, Qt4_with_cmake, or this file for an example.

Essentially, CMakeLists.txt will be what you work on to add new files to the project instead of the .pro and makefile. CMake will then call qmake and whatever is needed to process your UI files. This worked great with Eclipse and the Qt-Designer plugin, so I bet it will also work with Qt Creator. The fact that you will also have ROS in your CMakeLists should not interfere in any way.

See this link for using Creator with a CMake project.

edit flag offensive delete publish link more

Your Answer

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

Add Answer

[hide preview]

Stats

Asked: 2011-04-12 04:00:49 -0500

Seen: 2,663 times

Last updated: Apr 12 '11