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

How to import ROS project C++ file into QT-Creator and compile them?

asked 2013-08-16 22:53:31 -0600

SeiedMilad gravatar image

updated 2014-01-28 17:17:41 -0600

ngrennan gravatar image

Hi, I want to import my ROS project into Qt-Creator for compiling and having some gui and so on, so I've searched so much about it on th net but I couldn't find a specific answer for this question. consider that I want to import the ROS main tutorial on ROS site into QT-Creator, for instance I want to compile my client C++ node in Qt-Creator with out compiling it in terminal window, so is there any way ? I need more visual interface for Coding than linux text editor.

Regards

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
11

answered 2013-08-17 04:32:57 -0600

Miguel S. gravatar image

It's actually fairly easy to use QtCreator with ROS (I do it myself). This is a link that explains in more detail.

Briefly, you have to launch qtcreator from the terminal so that the program is aware of your environment variables ($PATH, $PYTHONPATH and so on...)

Once you've done that, go to File->Open Project and navigate to the CMakeLists.txt of your project (if you're using catkin that'd be /path/to/catkin_ws/src/CMakeLists.txt). QtCreator will then ask you to choose a build directory. Simply select the build directory inside the package (or /path/to/catkin_ws/build/ if using catkin). Finally tell QtCreator to run CMake, and voilà you're done!

edit flag offensive delete link more

Comments

Thanks Miguel, it works!

redheli gravatar image redheli  ( 2013-08-25 15:36:23 -0600 )edit

well,how to import ROS project python file into QT-Creator and compile them??

jxl gravatar image jxl  ( 2013-12-12 02:18:28 -0600 )edit

When setting things up this way the build system only creates a build directory, not a devel directory. I guess this is because catkin is not called, only CMake is, no? So what is the good practise? Work in qtcreator and then compile using catkin in a separate terminal?

arennuit gravatar image arennuit  ( 2014-08-08 11:07:22 -0600 )edit

I launch qtcreator from sourced terminal but still qtcreator cannot find maky catkin packages like cv_bridge, rosconsoleConfig ect. But i can build the package from terminal through catkin_make.. How is terminal able to find the packages where qtcreator is failing?

Anurag VV gravatar image Anurag VV  ( 2018-06-14 04:49:41 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2013-08-16 22:53:31 -0600

Seen: 13,168 times

Last updated: Aug 17 '13