ros(13):ros找不到包报错及解决办法--Config.cmake

2023-05-16

目录

一 基础包

1.1 rospy包

1.2 tf包

1.3 grid_map包

1.4 serial

二 专有包

2.1 dynamic_reconfigure包

2.2 rosparam_handler包

2.3 qt_build包

2.4 grid_map_sdf包

2.5 catkin_simple

2.6 camera_info_manager包

2.7 fake_localization包

2.8 laser_filters包

2.9 joint_state_publisher包

三 单独编译包

3.1 casadi包

3.2 ceres包

四 apt-get安装包

4.1 GTest


        注:melodic为ubuntu18.04对应的ros版本名称,ubuntu16.04对应kinetic,ubuntu20.04对应noetic;下面需要简单更改就好

一 基础包

1.1 rospy包

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

    rospyConfig.cmake
    rospy-config.cmake
sudo apt-get install ros-melodic-rospy

1.2 tf包

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

    tfConfig.cmake
    tf-config.cmake

        下面装了比较多的tf*包,解决方案比较暴力,也可以先一个个装,试试还报不报错

sudo apt-get install ros-melodic-tf*

1.3 grid_map包

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

    grid_map_rosConfig.cmake
    grid_map_ros-config.cmake
sudo apt-get install ros-melodic-grid-map

1.4 serial

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

    serialConfig.cmake
    serial-config.cmake

sudo apt-get install ros-melodic-serial

二 专有包

2.1 dynamic_reconfigure包

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

    dynamic_reconfigureConfig.cmake
    dynamic_reconfigure-config.cmake

        这个好像是用于智能车辆规划控制的包

sudo apt-get install ros-melodic-dynamic-reconfigure

2.2 rosparam_handler包

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

    rosparam_handlerConfig.cmake
    rosparam_handler-config.cmake

        这个好像是用于调参的包

sudo apt-get install ros-melodic-rosparam-handler

2.3 qt_build包

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

    qt_buildConfig.cmake
    qt_build-config.cmake
sudo apt-get install ros-melodic-qt-build

2.4 grid_map_sdf包

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

    grid_map_sdfConfig.cmake
    grid_map_sdf-config.cmake

        这个包好像独立于1.3 的grid_map?

sudo apt-get install ros-melodic-grid-map-sdf

2.5 catkin_simple

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

    catkin_simpleConfig.cmake
    catkin_simple-config.cmake
git clone https://github.com/catkin/catkin_simple

         放在src中即可

2.6 camera_info_manager包

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

    camera_info_managerConfig.cmake
    camera_info_manager-config.cmake
sudo apt-get install ros-melodic-camera-info-manager

2.7 fake_localization包

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

    fake_localizationConfig.cmake
    fake_localization-config.cmake
sudo apt-get install ros-melodic-fake-localization

2.8 laser_filters包

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

    laser_filtersConfig.cmake
    laser_filters-config.cmake
sudo apt-get install ros-melodic-laser-filters

2.9 joint_state_publisher包

ERROR: cannot launch node of type [joint_state_publisher/joint_state_publisher]: joint_state_publisher
sudo apt-get install ros-melodic-joint-state-publisher

2.10 teleop_twist_keyboard包

[rospack] Error: package 'teleop_twist_keyboard' not found
sudo apt-get install ros-melodic-teleop-twist-keyboard 

三 单独编译包

3.1 casadi包

CMake Error at /home/xxxx/CMakeLists.txt:22 (find_package):
  By not providing "Findcasadi.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "casadi", but
  CMake did not find one.

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

    casadiConfig.cmake
    casadi-config.cmake

        单独编译安装,在https://github.com/casadi/casadi上下载,安装:

cd casadi
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
make
sudo make install

3.2 ceres包

CMake Error at /home/xxxx/opt_solver/CMakeLists.txt:25 (find_package):
  By not providing "FindCeres.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Ceres", but
  CMake did not find one.

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

    CeresConfig.cmake
    ceres-config.cmake

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

        一般为编译安装,具体参考各大博主

        不过可以安装二进制格式,我在Xavier NX上试过,不会引起程序报错

sudo apt install libceres-dev

四 apt-get安装包

4.1 GTest

        Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY)

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindGTest.cmake:196 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  tests/CMakeLists.txt:1 (find_package)

        大概是因为GTest虽然安装过,但是好像找不到头文件之类的

        解决办法:(重新安装、重新编译)

sudo apt-get install libgtest-dev
sudo apt-get install cmake
cd
cd /usr/src/gtest
sudo cmake CMakeLists.txt 
sudo make 
sudo cp *.a /usr/lib

参考链接:https://blog.csdn.net/numberors/article/details/109765131

@meng

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ros(13):ros找不到包报错及解决办法--Config.cmake 的相关文章

随机推荐