幻宇机器人ros程序编译报错

缺少依赖如:

xxx_yyy_zzzConfig

即将安装:sudo apt-gat install ros-melodic-xxx-yyy-zzz:

备注:将缺少的下划线变成短横杠即可安装成功。

1.未安装串口依赖;

-- Could not find the required component 'serial'. 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/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "serial" with any
  of the following names:

    serialConfig.cmake
    serial-config.cmake

sudo apt install ros-noetic(或者melodic或者kinetic)-serial

2.未安装SDL依赖

-- Found Bullet: /usr/lib/x86_64-linux-gnu/libBulletDynamics.so  
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindSDL.cmake:188 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  huanyu_navigation/map_server/CMakeLists.txt:12 (find_package)

sudo apt-get install libsdl-image1.2-dev
sudo apt-get install libsdl-dev.

3.未安装bfl依赖

-- Checking for module 'orocos-bfl'
--   No package 'orocos-bfl' found
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
  A required package was not found

sudo apt install liborocos-bfl-dev
 

4.重新定位Boost

根据错误显示;找到报错位置,打开文件进行修改

 huanyu_navigation/fake_localization/CMakeLists.txt:17 (find_package):

-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
  Could not find a package configuration file provided by "boost_signals"
  (requested version 1.71.0) with any of the following names:

    boost_signalsConfig.cmake
    boost_signals-config.cmake

  Add the installation prefix of "boost_signals" to CMAKE_PREFIX_PATH or set
  "boost_signals_DIR" to a directory containing one of the above files.  If
  "boost_signals" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
  /usr/share/cmake-3.16/Modules/FindBoost.cmake:443 (find_package)
  huanyu_navigation/fake_localization/CMakeLists.txt:17 (find_package)

将原先的find_package(Boost REQUIRED COMPONENTS signals)注释掉:增加:

#find_package(Boost REQUIRED COMPONENTS signals)
set(Boost_INCLUDE_DIRS /usr/include/boost)

set(Boost_INCLUDE_DIRS /usr/include/boost)语句即可;

5.未定位到opencv文件夹

-- Could NOT find OpenCV (missing: OpenCV_DIR)
-- Could not find the required component 'OpenCV'. 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/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  camera_image/CMakeLists.txt:6 (find_package)

找到camera_image/CMakeLists.txt:6 (find_package)文件,并打开;

set(OpenCV_DIR /opt/ros/kinetic/share/OpenCV-3.3.1-dev)

这几句换opencv定位路径不对:

查看本系统安装的opencv路径:

locate OpenCVConfig.cmake(可能需要安装:sudo apt install mlocate)

/usr/lib/x86_64-linux-gnu/cmake/opencv4/OpenCVConfig.cmake

修改路径映射:

#set(OpenCV_DIR /opt/ros/kinetic/share/OpenCV-3.3.1-dev)
set(OpenCV_DIR /usr/lib/x86_64-linux-gnu/cmake/opencv4)

6.缺少依赖:

CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "move_base_msgs"
  with any of the following names:

    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake

  Add the installation prefix of "move_base_msgs" to CMAKE_PREFIX_PATH or set
  "move_base_msgs_DIR" to a directory containing one of the above files.  If
  "move_base_msgs" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  huanyu_navigation/move_base/CMakeLists.txt:4 (find_package)

sudo apt-get install ros-noetic(或者melodic或者kinetic)-move-base

7.缺少依赖

CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "costmap_converter"
  with any of the following names:

    costmap_converterConfig.cmake
    costmap_converter-config.cmake

  Add the installation prefix of "costmap_converter" to CMAKE_PREFIX_PATH or
  set "costmap_converter_DIR" to a directory containing one of the above
  files.  If "costmap_converter" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  teb_local_planner/CMakeLists.txt:8 (find_package)

sudo apt-get install ros-melodic-costmap-converter

8. 缺少依赖

CMake Error at teb_local_planner/cmake_modules/FindSUITESPARSE.cmake:131 (MESSAGE):
  Unable to find SuiteSparse
Call Stack (most recent call first):
  teb_local_planner/CMakeLists.txt:31 (find_package

sudo apt-get install libsuitesparse-dev

9.缺少依赖

CMake Error at teb_local_planner/cmake_modules/FindG2O.cmake:85 (message):
  Could not find libg2o!
Call Stack (most recent call first):
  teb_local_planner/CMakeLists.txt:32 (find_package)

sudo apt-get install ros-noetic(或者melodic或者kinetic)-libg2o

参照:Ubuntu日常使用问题杂记_向阳花开_的博客-CSDN博客

扩展:

系统提示缺少什么包,就安装什么包即可:sudo apt-get install ros-melodic-***,依据自己的系统和出错提示更改相关内容。

报错:

CMake Error at ros_astra_camera/CMakeLists.txt:8 (find_package):
  By not providing "Findlibuvc.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "libuvc", but
  CMake did not find one.

  Could not find a package configuration file provided by "libuvc" with any
  of the following names:

    libuvcConfig.cmake
    libuvc-config.cmake

执行:

sudo apt-get install ros-melodic-libuvc

报错:

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "joy" with any of
  the following names:

    joyConfig.cmake
    joy-config.cmake

  Add the installation prefix of "joy" to CMAKE_PREFIX_PATH or set "joy_DIR"
  to a directory containing one of the above files.  If "joy" provides a
  separate development package or SDK, be sure it has been installed.

执行:

sudo apt-get install ros-melodic-joy

 报错:

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "tf2_sensor_msgs"
  with any of the following names:

    tf2_sensor_msgsConfig.cmake
    tf2_sensor_msgs-config.cmake

执行:

sudo apt-get install ros-melodic-tf2-sensor-msgs

报错:

-- Checking for module 'orocos-bfl'
--   No package 'orocos-bfl' found
CMake Error at /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:419 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:597 (_pkg_check_modules_internal)
  robot_pose_ekf/CMakeLists.txt:6 (pkg_check_modules)


-- Configuring incomplete, errors occurred!

执行:

 sudo apt-get install ros-melodic-bfl

  • 3
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值