ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Problem using Qt creator with ROS

asked 2013-03-18 04:42:20 -0600

DavidLavy gravatar image

updated 2014-01-28 17:15:46 -0600

ngrennan gravatar image


I'm trying to use Qt creator to edit my ROS files, I have read a few advices about how to do it. I'll try to explain what I've done and the problems I have concisely:

  1. Create a normal ROS pkg using roscreate-pkg (e.g. $roscreate-pkg test roscpp)
  2. Given that Qt has some enviromental issues, I've launched Qt creator from command using:

    $ sudo -s

    $ qtcreator

  3. Now I have the welcome page, and I click on Open Project and go to where my project is located in this case: /home/david/fuerte_workspace/sandbox/test and I select the CMakeLists.txt

  4. Now I have this image:

Build Location

  1. I cliked on continue (just accepted the default option), and led me here:

Run Cmake

  1. I clicked on Run CMake, and this is what I got:

-- Configuring incomplete, errors occurred! CMake Error at /opt/ros/fuerte/share/ros/core/rosbuild/private.cmake:99 (message): [rosbuild] rospack found package "test" at "", but the current directory is "/home/david/fuerte_workspace/sandbox/test". You should double-check your ROS_PACKAGE_PATH to ensure that packages are found in the correct precedence order. Call Stack (most recent call first): /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location) CMakeLists.txt:12 (rosbuild_init)

[rosbuild] Building package test -- Found PythonInterp: /usr/bin/python2.7 -- Detecting CXX compiler ABI info - done -- Detecting CXX compiler ABI info -- Check for working CXX compiler: /usr/bin/c++ -- works -- Check for working CXX compiler: /usr/bin/c++ -- Detecting C compiler ABI info - done -- Detecting C compiler ABI info -- Check for working C compiler: /usr/bin/gcc -- works -- Check for working C compiler: /usr/bin/gcc -- The CXX compiler identification is GNU -- The C compiler identification is GNU


I don't have a lot of experience with this, I will appreciate an easy-to-understand explanation if possible.

Thanks in advance!!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2013-03-18 05:26:09 -0600

dornhege gravatar image

Your ROS environment is not initialized. This is probably because you start from sudo -s which usually puts you in a root shell instead of a user shell.

I would highly recommend not running your GUI as root.

edit flag offensive delete link more


Thank you! I did initialized my ROS environment ... But when I access root, appeareantly I have to do it again.

DavidLavy gravatar image DavidLavy  ( 2013-03-18 10:15:30 -0600 )edit

And the reason I ran Qt as root is because it has an issue when you don't. In this post (you have to translate it to English) explains what happens when you run QtCreator normally. I had the same issue, and by far is the only solution I could find

DavidLavy gravatar image DavidLavy  ( 2013-03-18 10:17:31 -0600 )edit

You are fixing the problem at the wrong end. According the the thread you linked to the problem is still caused by sudo or sudo -s. Serial ports can be configured to be read as your user (adduser <USER> dialout) and as to the error messages: There should be a solution to that.

dornhege gravatar image dornhege  ( 2013-03-18 11:30:26 -0600 )edit

What would be the right way? I don't really understand the whole idea of environment issues and why using sudo -s is still wrong. Is the 'adduser <USER> dialout' a command should I execute, and what exactly it does?

DavidLavy gravatar image DavidLavy  ( 2013-03-19 10:12:16 -0600 )edit

sudo -s will basically run the program as root instead of your user. Besides security issues, your whole user setup isn't there. adduser &lt;YOUR_USER&gt; dialout puts you in the group dialout. Usually serialports are accessible then. There also is probably some GUI for user management.

dornhege gravatar image dornhege  ( 2013-03-20 01:49:02 -0600 )edit

answered 2013-03-18 06:42:53 -0600

The very simple instructions on the IDEs page should work provided you have set up your ROS environment variables correctly.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2013-03-18 04:42:20 -0600

Seen: 2,570 times

Last updated: Dec 08 '13