Ask Your Question
0

Why qtcreator cannot find catkin packages?[SOLVED]

asked 2018-06-14 05:05:21 -0500

Anurag VV gravatar image

updated 2018-06-14 13:06:02 -0500

These are workspaces that could be successfully catkin_make in ternimal. I sourced the workspace in terminal and then launched qtcreator. But qtcreator still cannot find many catkin packages. I do not know why terminal ould find all the packages but qtcreator cannot.

Ubuntu 16.04 QtCreator version : Qt Creator 4.5.1 based on Qt 5.10.0

ROS Kinetic(if this is any pertinent)

edit retag flag offensive close merge delete

Comments

Did you setup build directory and so on when you open your project in qt?

adroit89 gravatar imageadroit89 ( 2018-06-14 07:12:12 -0500 )edit

I do not see options to setup build directory. If you mean going to tools->options->Build & Run->General->Directory, yes i did. Could you give me a link to what you are mentioning??

Anurag VV gravatar imageAnurag VV ( 2018-06-14 12:25:29 -0500 )edit

The error i get usually is related to catkin components. for example CMakelist.txt: find_package(catkin REQUIRED COMPONENTS):

Error: CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "cv_bridge" ...

Anurag VV gravatar imageAnurag VV ( 2018-06-14 12:45:44 -0500 )edit

I figured out what was lacking. I solved it by adding /opt/ros/kinetic to CMAKE_PREFIX_PATH in Project -> build environment

Anurag VV gravatar imageAnurag VV ( 2018-06-14 13:00:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-06-14 13:03:40 -0500

Anurag VV gravatar image

I solved it by adding /opt/ros/kinetic to CMAKE_PREFIX_PATH in Project -> build environment. Thanks to answer by amcelroy at https://answers.ros.org/question/2158...

edit flag offensive delete link more

Comments

I had the same issue. A bit disappointing that the QtCreator ROS-Plugin does not source ROS in an automated fashion. Thank you for your hint about adding it to the CMAKE_PREFIX_PATH did the trick.

I found that if you do not want to do so every time your ROS package, you can include the following to your top-level CMakeList (the one you use to open the project): list(APPEND CMAKE_PREFIX_PATH "/opt/ros/kinetic/")

andis gravatar imageandis ( 2019-08-21 06:39:22 -0500 )edit

@andis:

A bit disappointing that the QtCreator ROS-Plugin does not source ROS in an automated fashion.

OP does not state he's using the QtC ROS plugin. It would seem he's using plain Qt Creator.

And if you are using the QtCreator ROS plugin: it should automatically setup include paths and everything else for you. If it doesn't, that would be an issue to solve and you should report it.

gvdhoorn gravatar imagegvdhoorn ( 2019-08-21 07:53:20 -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

2 followers

Stats

Asked: 2018-06-14 05:05:21 -0500

Seen: 1,545 times

Last updated: Jun 14 '18