ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

pcl_ros can't find package

asked 2018-12-27 07:54:04 -0500

antoineniotna gravatar image

When I am running the CMAKE of my project, this error appear. I am working on the lunar distribution and I have installed the ros-lunar-pcl* my pcl version is 1.8. I have look on the web, but nothing worked. I have no idea what can be happening, so if someone has an idea on where to look that be great :)

Here is the error:

> Running "/usr/bin/cmake /home/components/ROS/src/landmark_calibration '-GCodeBlocks - Unix Makefiles' -DCMAKE_CXX_COMPILER:STRING=/usr/bin/x86_64-linux-gnu-g++ -DCMAKE_C_COMPILER:STRING=/usr/bin/x86_64-linux-gnu-gcc -DCMAKE_PREFIX_PATH:STRING=/usr -DQT_QMAKE_EXECUTABLE:STRING=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake" in /home/components/ROS/src/landmark_calibration-build.
-- Using CATKIN_DEVEL_PREFIX: /home/components/ROS/src/landmark_calibration-build/devel
-- Using CMAKE_PREFIX_PATH: /usr
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/components/ROS/src/landmark_calibration-build/test_results
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.14
CMake Warning at /opt/ros/lunar/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "pcl_ros" with any
  of the following names:

    pcl_rosConfig.cmake
    pcl_ros-config.cmake

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


-- Could not find the required component 'pcl_ros'. 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.
-- Configuring incomplete, errors occurred!
See also "/home/components/ROS/src/landmark_calibration-build/CMakeFiles/CMakeOutput.log".
See also "/home/components/ROS/src/landmark_calibration-build/CMakeFiles/CMakeError.log".
CMake Error at /opt/ros/lunar/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "pcl_ros" with any
  of the following names:

    pcl_rosConfig.cmake
    pcl_ros-config.cmake

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


*** cmake process exited with exit code 1.

And here is my CMakeList.txt:

`cmake_minimum_required(VERSION 2.8.0)
project(landmark_calibration)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
set(CMAKE_BUILD_TYPE Debug)

##############################################################################
# Catkin
##############################################################################
set(catkin_package_DEPENDENCIES
    roscpp
    pcl_ros
    pcl_conversions
    # qt_build provides the qt cmake glue, roscpp the comms for a default talker
)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED)
find_package(yaml-cpp REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED )


## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system $(catkin_package_DEPENDENCIES))
find_package(catkin REQUIRED COMPONENTS ${catkin_package_DEPENDENCIES} )

# Use this ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-04-12 12:39:00 -0500

130s gravatar image

Despite the error message being printed by cmake, this error message can still occur when the dependency on the package in question is properly configured in CMakeLists.txt, when the depended pkg itself is missing. So check if pcl_ros package is available on your host.

FYI I just had it occurred (on ROS Foxy) and installing it (apt install ros-foxy-pcl-ros) resolved that.

edit flag offensive delete link more
0

answered 2020-05-26 09:14:35 -0500

hh10 gravatar image

Can look at this example: https://github.com/ros-perception/per...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-12-27 07:54:04 -0500

Seen: 4,075 times

Last updated: Apr 12 '23