ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Howdy,

I had the same problem, right down to the echo ${CMAKE_PREFIX_PATH} showing up in the terminal, but not in the QT Creator called in the same terminal.

Setup: Kintetic Ubuntu 16.04

My solution was:

  • Follow the steps here: http://wiki.ros.org/IDEs#QtCreator section 4.3
  • New File or Project -> Import Project -> Import Existing Project
  • Select the ~/workspace/src/package folder
  • Add the CMakeList.txt
  • On the side bar, click on Projects, and under Build Environment, add a new CMAKE_PREFIX_PATH variable that is the same as the one pointed to by echo ${CMAKE_PREFIX_PATH}, it should be something like /opt/ros/kinetic.
  • Also had to had the Run Environment Variable ROS_MASTER_URI and set it to http://localhost:11311 or else the package crashes at pos::init

After this, I was able to build, and debug by pointed to the program in the ~/workspace/devel/lib folder.

Hope this helps!

EDIT - Added additional step regarding ROS_MASTER_URI