Ask Your Question
5

Qt Creator 2.8.1 ROS and Catkin problems

asked 2013-10-16 06:11:24 -0500

pnyholm gravatar image

updated 2014-01-28 17:18:15 -0500

ngrennan gravatar image

I am using Ubuntu 12.04LTS 64-bit, Hydro, Qt 5.1.1, and Qt Creator 2.8.1.

I have been working on some wet ROS packages using Qt Creator without a hitch when using Qt Creator 2.4.1 and Qt 4.8 from Ubuntu's software center. However, I want to take advantage of some of the nice new openGL helper functions in Qt 5.1 so I installed it alongside 4.8. I also installed the latest version of Qt Creator (2.8.1) as recommended by that community.

Qt Creator 2.8.1 is working great for non-ROS projects using a .pro file. But when I try to open ROS package from a CMakeLists.txt I get a few weird problems that I'm not sure how to fix. I'll walk you through what happens.

I open my catkin workspace using CMakeLists.txt:

$ /opt/qtcreator-2.8.1/bin/qtcreator sandbox/src/CMakeLists.txt

With Qt Creator 2.4.1, the build directory auto-populates with something like /sandbox/qt-build and I would simply change it to /sandbox/build. However, with 2.8.1 the auto-populated build directory is "/opt/ros/hydro/share/catkin/cmake-build". So I switch it to "/sandbox/build".

Then I press next and Run CMake. CMake executes with no errors, just as I would expect it to.

-- Configuring done -- Generating done -- Build files have been written to: /home/pwn/sandbox/build

I Click finish, and get the following error:

"Cannot create file /opt/ros/hydro/share/catkin/cmake/toplevel.cmake.user: Permission denied"

After click finish, the project is populated with a bunch of catkin nonsense, but none of my actual ROS packages.

I then get two popup windows with the following error:

"Cannot create file /opt/ros/hydro/share/catkin/cmake/toplevel.cmake.user: Permission denied"

Has anyone else run into any of these sorts of issues with the newer version of Qt Creator? Have you found any solutions?

For now I am just using Qt Creator 2.4.1 and it continues to work well, but I would love to have only one version on my computer that works for ROS and other projects.

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted
9

answered 2014-04-17 05:41:34 -0500

sebsch gravatar image

updated 2014-04-17 09:03:42 -0500

The following worked for me with qtcreator 3.0.1 on Ubuntu 14.04 (Trusty) with ROS Indigo

Within your src directory, check which file the symlink CMakeLists.txt points to. In my case (Indigo on Trusty), ls -l tells me:

CMakeLists.txt -> /opt/ros/indigo/share/catkin/cmake/toplevel.cmake

Then replace the symlink with a copy of toplevel.cmake:

rm CMakeLists.txt

cp /opt/ros/indigo/share/catkin/cmake/toplevel.cmake CMakeLists.txt

edit flag offensive delete link more

Comments

Doing that...are you sure you don't mess up your system? I have the same problem with the same version of Qt Creator. There a way to undo those operation of QtCreator doesn't run?

Andromeda gravatar image Andromeda  ( 2014-12-05 12:06:06 -0500 )edit

I have been applying this fix to my workspaces and it doesn't seem to mess up my system at all. Not sure about the answer to your second question

pnyholm gravatar image pnyholm  ( 2014-12-05 12:54:54 -0500 )edit
1

I try, it works!!thank you! but can anybody tell me why?

feixiao gravatar image feixiao  ( 2015-12-21 20:42:25 -0500 )edit
1

answered 2015-08-07 11:56:36 -0500

samouel gravatar image

hi i have problems with qt.

when i press RUN it can not RUN please help me

if u need my TeamViewer tell me

edit flag offensive delete link more
0

answered 2013-10-23 04:15:40 -0500

rols gravatar image

updated 2013-10-23 04:16:42 -0500

I had the same problem and resorted back to qt creator 2.4.1. After further investigation I found that running the cmake and building the project in qt creator 2.8.1 worked even though the whole ros source list is in the project viewer.

So my solution:

In qt creator 2.8.1, (once the CMakeList.txt has been imported into qt creator and the cmake has been run) in the project explorer expand the '..' directory, over and over again until you get to your home directory and ultimately the catkin workspace, form there your package (source files, build files etc.) should be accessible.

Don't know why the whole ros workspace is visible in 2.8.1 and not 2.4.1.

Hope this helps

edit flag offensive delete link more
0

answered 2013-11-20 21:11:10 -0500

danielm0hr gravatar image

Hi,

i have the same proplem with Qt Creator 2.8.1. I think, it just follows the toplevel cmake file symlink of the workspace in another way. Not sure, why...

Just for you to know, the latest version of Qt Creator I found still working with catkin workspaces is version 2.7.2. You can download it here: http://download.qt-project.org/official_releases/qtcreator/2.7/2.7.2/

edit flag offensive delete link more
0

answered 2013-10-16 22:39:39 -0500

makokal gravatar image

You should set up a local catkin work space from which you work. See the ros catkin tutorials for that

edit flag offensive delete link more

Comments

I do have a catkin workspace created. As a mentioned, it works great for Qt Creator 2.4.1 and catkin. Qt Creator 2.8.1 is throwing the error. Nothing about my catkin setup has changed, just the version of Qt Creator. Thanks for the advice though!

pnyholm gravatar image pnyholm  ( 2013-10-17 05:05:05 -0500 )edit

Your Answer

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

Add Answer

Question Tools

5 followers

Stats

Asked: 2013-10-16 06:11:24 -0500

Seen: 7,054 times

Last updated: Apr 17 '14