cant find header files ROS open with QT Creator
I have ubuntu 18.04 + ROS melodic
I am following the ros tutorials for begginers
I have roscpp added to my include compoents in cmakelists
I am trying to open a cpp file in my project in the final src folder in my catkin workspace, as the tutorial does.
Tried opening cpp file. and it cannot find header files.
Error that come up in creator:
warning: this file is not part of any project
General messages: [ROS Warning] Unable to locate build directory for package: beginner_tutorials.
[ROS Warning] Failed to source workspace because this file does not exist: setup.bash.
in opening the cpp file in qt:
file, open new file->other project-> rosworkspace -> pjct name: catkinws buildsystem:CtakinTools choose workspace path=: /catkinws
i open workspace which is fine:
warning: [ROS Warning] Unable to locate package beginner_tutorials build file: /home/joe/catkin_ws/build/beginner_tutorials/beginner_tutorials.cbp.
[ROS Debug] Sourced workspace: /home/joe/catkin_ws/devel/setup.bash.
Asked by snackbob on 2019-10-26 12:12:25 UTC
Answers
It sounds like you're using the ROS Qt Creator Plugin. Note that the plugin won't work correctly if you open an individual .cpp file outside a project.
- Have you run
catkin init
in yourcatkin_ws
directory? - Have you imported the ROS workspace into Qt Creator?
- Have you built the project from within Qt Creator (ctrl-B, or the hammer icon in the lower left corner of the window).
You'll get lots of warnings if you haven't built the workspace from within Qt Creator. The plugin does some behind-the-scenes work when you build the package within Qt Creator in order to generate the code model, which enables syntax highlighting, autocompletion, and other quality-of-life features.
Asked by jschornak on 2019-11-04 23:44:42 UTC
Comments
I had the same problem (Ubuntu 18.04 + Qt Creator 4.9.2), and was able to solve it by restarting Qt Creator.
Asked by azoic6 on 2021-06-02 12:51:30 UTC
Comments
Hej could you solve the problem? I m getting the same warning. Or can I ignore the warning?
I was following this tutorial : part 1 : https://www.youtube.com/watch?v=7QgjR6m-0KM and here part 2:https://www.youtube.com/watch?v=MPovFrZloaY
Asked by mateus224 on 2020-08-26 09:14:53 UTC
I'm also having this problem. Have you found a solution yet? Thanks
Asked by azoic6 on 2021-05-31 09:25:26 UTC