chengyangkj / Ros_Qt5_Gui_App

ROS human computer interface based on Qt5(基于Qt5的ROS人机交互界面)
GNU General Public License v2.0
898 stars 304 forks source link

老师好,购买了课程,出现了这个问题,没有搜索到解答的问题, #24

Closed daaiwusheng closed 8 months ago

daaiwusheng commented 1 year ago

qtcreator 打开主分支工程,按照课堂上的操作步骤出现的问题,目前的环境是ubuntu18.04, 虚拟机,也是很纯净的一个环境.

Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK. Could not read qmake configuration file /opt/Qt5.14.2/5.14.2/android/mkspecs/android-clang/qmake.conf. Running "/usr/bin/cmake -E server --pipe=/tmp/cmake-.UpqsUI/socket --experimental" in /home/steven/catkin_ws/build. Starting to parse CMake project. Using CATKIN_DEVEL_PREFIX: /home/steven/catkin_ws/devel Using CMAKE_PREFIX_PATH: Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") Using PYTHON_EXECUTABLE: /usr/bin/python2 Using Debian Python package layout Using empy: /usr/bin/empy Using CATKIN_ENABLE_TESTING: ON Call enable_testing() Using CATKIN_TEST_RESULTS_DIR: /home/steven/catkin_ws/build/test_results Found gtest sources under '/usr/src/googletest': gtests will be built Found gmock sources under '/usr/src/googletest': gmock will be built Found PythonInterp: /usr/bin/python2 (found version "2.7.17") Using Python nosetests: /usr/bin/nosetests-2.7 catkin 0.7.29 BUILD_SHARED_LIBS is on CMake Error at /opt/ros/melodic/share/catkin/cmake/safe_execute_process.cmake:11 (message): execute_process(/usr/bin/python2 "/home/steven/catkin_ws/build/catkin_generated/generate_cached_setup.py") returned error code 1 Call Stack (most recent call first): /opt/ros/melodic/share/catkin/cmake/all.cmake:208 (safe_execute_process) /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:58 (find_package)

Configuring incomplete, errors occurred! See also "/home/steven/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/steven/catkin_ws/build/CMakeFiles/CMakeError.log". CMake Project parsing failed.

daaiwusheng commented 1 year ago

解决了这个问题, 出示问题还是catkin_make找不到,后来改变了ros 的setup.bash到~/.profile出现了这个问题. 改回到~/.bashrc后,就是catkin_make找不到的问题. 然后在用qtcreator打开cmakelist.txt之后把build camke一栏里面有个CMAKE_PREFIX_PATH设置为当前系统的catkin路径,然后 下面有个apply changes. 就好了. 其实这个路径在最下面的系统环境变量里面找到粘贴过去就可以了