Ask Your Question
0

cant find header files ROS open with QT Creator

asked 2019-10-26 12:12:25 -0600

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: catkin_ws buildsystem:CtakinTools choose workspace path=: /catkin_ws

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-11-04 22:44:42 -0600

jschornak gravatar image

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 your catkin_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.

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

1 follower

Stats

Asked: 2019-10-26 12:12:25 -0600

Seen: 21 times

Last updated: Nov 04