qt开发ROS遇到这个问题 find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAK...

为了实现用Qt开发ROS界面开发环境,我几乎参阅了网上所有的配置教程,安装了多个版本的qt,在ubuntu14.04和ubuntu16.04上分别进行了配置,最后都成功了。不得不说的是用QTCREATOR开发ROS,进行GUI开发真的很强大。

在这个过程中遇到了各种问题,其中一个是:

解决这个问题需要两个步骤:

1.在qt界面左下角将default改为debug.

2.qt界面左边导航栏选择preject,在build settings选项卡中CMAKE 的build directory:修改为工作空间下的build路径。

具体如下图:

 

修改为下图:

qt 可以实现插断点调试Ros GUI界面了。

欢迎需要配置QT ROS GUI 的各位网友在下方留言,交流配置过程中的问题。最后来一张我配置好的界面。

 

转载于:https://www.cnblogs.com/fuhang/p/9764719.html

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
# toplevel CMakeLists.txt for a catkin workspace # catkin/cmake/toplevel.cmake cmake_minimum_required(VERSION 3.0.2) project(Project) set(CATKIN_TOPLEVEL TRUE) # search for catkin within the workspace set(_cmd "catkin_find_pkg" "catkin" "${CMAKE_SOURCE_DIR}") execute_process(COMMAND ${_cmd} RESULT_VARIABLE _res OUTPUT_VARIABLE _out ERROR_VARIABLE _err OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ) if(NOT _res EQUAL 0 AND NOT _res EQUAL 2) # searching fot catkin resulted in an error string(REPLACE ";" " " _cmd_str "${_cmd}") message(FATAL_ERROR "Search for 'catkin' in workspace failed (${_cmd_str}): ${_err}") endif() # include catkin from workspace or via find_package() if(_res EQUAL 0) set(catkin_EXTRAS_DIR "${CMAKE_SOURCE_DIR}/${_out}/cmake") # include all.cmake without add_subdirectory to let it operate in same scope include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE) add_subdirectory("${_out}") else() # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument # or CMAKE_PREFIX_PATH from the environment if(NOT DEFINED CMAKE_PREFIX_PATH) if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "") if(NOT WIN32) string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) else() set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) endif() endif() endif() # list of catkin workspaces set(catkin_search_path "") foreach(path ${CMAKE_PREFIX_PATH}) if(EXISTS "${path}/.catkin") list(FIND catkin_search_path ${path} _index) if(_index EQUAL -1) list(APPEND catkin_search_path ${path}) endif() endif() endforeach() # search for catkin in all workspaces set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE) find_package(catkin QUIET NO_POLICY_SCOPE PATHS ${catkin_search_path} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) unset(CATKIN_TOPLEVEL_FIND_PACKAGE) if(NOT catkin_FOUND) message(FATAL_ERROR "find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.") endif() endif() catkin_workspace()在哪添加target_link_libraries(your_target_name avcodec avformat swscale)
07-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值