ROS-Qt project issue
Hello All!
I am currently working on building a qt app for ROS Melodic. The app's purpose is to send commands to a mobile robot for movement. I am following this blogpost for reference. After creating the "qtros" project in my catkin workspace, when I try to open the project in my qtcreator, the parsing of the CMakeLists.txt file fails, giving this message
Could NOT find qt_build (missing: qt_build_DIR) Could not find the required component 'qt_build'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "qt_build" with any of the following names:
qt_buildConfig.cmake
qt_build-config.cmake
Add the installation prefix of "qt_build" to CMAKE_PREFIX_PATH or set "qt_build_DIR" to a directory containing one of the above files. If "qt_build" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:13 (find_package)
Configuring incomplete, errors occurred! See also "/tmp/QtCreator-XzAWGc/qtc-cmake-yqSteIho/CMakeFiles/CMakeOutput.log". See also "/tmp/QtCreator-XzAWGc/qtc-cmake-yqSteIho/CMakeFiles/CMakeError.log". CMake Project parsing failed.
I tried opening a simple project file with a roscpp dependency too, it gives me this message
Could NOT find roscpp (missing: roscpp_DIR)
Could not find the required component 'roscpp'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "roscpp" with any
of the following names:
roscppConfig.cmake
roscpp-config.cmake
Add the installation prefix of "roscpp" to CMAKE_PREFIX_PATH or set
"roscpp_DIR" to a directory containing one of the above files. If "roscpp"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:10 (find_package)
Configuring incomplete, errors occurred!
See also "/home/aditya/Codeworks/ROS/catkin_ws/src/beginner_tutorials/CMakeFiles/CMakeOutput.log".
See also "/home/aditya/Codeworks/ROS/catkin_ws/src/beginner_tutorials/CMakeFiles/CMakeError.log".
CMake Project parsing failed.
Please can anyone help me solve this issue? And if u have any other verified resources that does the same thing, it will be much appreciated! Thanks!
Hi @Shapy,
For the first compilation issue you missed a strong dependency:
sudo apt-get install ros-melodic-qt-build
. For the second: Maybe a naive question but, Do you have ROS installed in your system? Because the fact that the CMake is unable to find roscpp is a clear indication that you do not have ROS installed or at least you have it misconfigured. Maybe yourROS_PACKAGE_PATH
environment variable is not set accordingly. Take a look at this wiki post, maybe you find it useful.