catkin_make "find_package" problem when compiling on the target machine

asked 2021-02-22 14:37:48 -0500

ogd gravatar image

updated 2022-05-28 16:51:15 -0500

lucasw gravatar image

Hi,

I am facing a problem regarding catkin_make on the target machine running Yocto dunfell OS. I am trying to compile the simplest example of ROS given in the tutorials section however I am receiving an error indicating that roscpp package is not found, although it is available in the ROS pathc. The full error message is given below,

imx8mm-var-dart:~/catkin_ws# catkin_make
Base path: /home/root/catkin_ws
Source space: /home/root/catkin_ws/src
Build space: /home/root/catkin_ws/build
Devel space: /home/root/catkin_ws/devel
Install space: /home/root/catkin_ws/install
Running command: "make cmake_check_build_system" in "/home/root/catkin_ws/build"
-- Using CATKIN_DEVEL_PREFIX: /home/root/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic;/usr
-- This workspace overlays: /opt/ros/melodic
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using default Python package layout
-- Using empy: /usr/lib/python2.7/site-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/root/catkin_ws/build/test_results
-- gtest not found, C++ tests can not be built. Please install the gtest headers globally in your system or checkout gtest (by running 'git clone https://github.com/google/googletest.git -b release-1.8.0' in the source space '/home/root/catkin_ws/src' of your workspace) to enable gtests
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.28
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- 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):
beginner_tutorials/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/root/catkin_ws/build/CMakeFiles/CMakeOutput.log".
make:  [Makefile:264: cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

The claimed missing files are available in the system as I can find them easily using roscd. I wonder if any kind of Yocto ROS Recipe dependency is missing. Below I am also sharing the ROS recipes that I have added into my Yocto OS. What might be missing here, I would appreciate your help.

IMAGE_INSTALL_append = " \
  ros-core \
  ros-base \
  roscpp \
  roscpp-core \
  roscpp-traits \
  ros-comm \
  roscpp-serialization \
  cob-utilities \
  mbf-msgs \
  catkin \
  catkin-dev \
  cartographer \
  cartographer-ros \
  cv-bridge \
  packagegroup-ros-turtlebot3-core \
  packagegroup-core-buildessential \
  packagegroup-core-full-cmdline \
  "
edit retag flag offensive close merge delete