Rosanswers logo


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

  1. 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

  2. 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!!

Originally posted by DavidLavy on ROS Answers with karma: 139 on 2013-03-18

Post score: 2


2 Answers 2


Rosanswers logo

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.

Originally posted by dornhege with karma: 31395 on 2013-03-18

This answer was ACCEPTED on the original site

Post score: 3

Original comments

Comment by DavidLavy on 2013-03-18:
Thank you! I did initialized my ROS environment ... But when I access root, appeareantly I have to do it again.

Comment by DavidLavy on 2013-03-18:
And the reason I ran Qt as root is because it has an issue when you don't. In this post http://www.mikrocontroller.net/topic/277821 (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

Comment by dornhege on 2013-03-18:
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 dialout) and as to the error messages: There should be a solution to that.

Comment by DavidLavy on 2013-03-19:
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 dialout' a command should I execute, and what exactly it does?

Comment by dornhege on 2013-03-20:
sudo -s will basically run the program as root instead of your user. Besides security issues, your whole user setup isn't there. adduser <YOUR_USER> dialout puts you in the group dialout. Usually serialports are accessible then. There also is probably some GUI for user management.


Rosanswers logo

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

Originally posted by Stefan Kohlbrecher with karma: 24361 on 2013-03-18

This answer was NOT ACCEPTED on the original site

Post score: 1


Your Answer

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